From 3f3016da6dfce1de7779410219266a71a500cc20 Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Mon, 15 Aug 2016 20:58:11 +1000 Subject: [PATCH] Make DarkenFGBG a function so it gets treated as an array when IDE support is not compiled in. --- source/ide/ide_methods.bas | 10 +++++----- source/qb64.bas | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index f7325a0c9..9e007e55a 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -187,7 +187,7 @@ FUNCTION ide2 (ignore) COLOR 7, 1: LOCATE idewy - 3, 2: PRINT SPACE$(idewx - 2);: LOCATE idewy - 2, 2: PRINT SPACE$(idewx - 2);: LOCATE idewy - 1, 2: PRINT SPACE$(idewx - 2); 'clear status window LOCATE idewy - 3, 2 - DarkenFGBG -1 + dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " COLOR 5, 1 @@ -1345,13 +1345,13 @@ FUNCTION ide2 (ignore) GOTO specialchar END IF - DarkenFGBG -1 + dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " COLOR 5, 1 LOCATE idewy - 3, 2: PRINT "Starting program..."; ELSE - DarkenFGBG -1 + dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " COLOR 5, 1 @@ -13984,10 +13984,10 @@ SUB UpdateIdeInfo PCOPY 3, 0 END SUB -SUB DarkenFGBG (Action AS _BYTE) +FUNCTION DarkenFGBG (Action AS _BYTE) 'Darken the interface while compilation is taking place, 'to give a sense of temporary unavailability: - IF Action = -1 THEN + IF Action = 1 THEN TempDarkerBGColor~& = _RGB32(_RED32(IDEBackgroundColor) * .5, _GREEN32(IDEBackgroundColor) * .5, _BLUE32(IDEBackgroundColor) * .5) TempDarkerBG2Color~& = _RGB32(_RED32(IDEBackgroundColor2) * .5, _GREEN32(IDEBackgroundColor2) * .5, _BLUE32(IDEBackgroundColor2) * .5) TempDarkerFGColor~& = _RGB32(_RED32(IDETextColor) * .5, _GREEN32(IDETextColor) * .5, _BLUE32(IDETextColor) * .5) diff --git a/source/qb64.bas b/source/qb64.bas index 9be07c9cc..50c175e45 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -1116,7 +1116,7 @@ IF C = 9 THEN 'run COLOR 7, 1: LOCATE idewy - 3, 2: PRINT SPACE$(idewx - 2);: LOCATE idewy - 2, 2: PRINT SPACE$(idewx - 2);: LOCATE idewy - 1, 2: PRINT SPACE$(idewx - 2); 'clear status window IF idemode THEN 'Darken fg/bg colors - DarkenFGBG -1 + dummy = DarkenFGBG(1) COLOR 5 END IF LOCATE idewy - 3, 2: PRINT "Starting program..."; @@ -1140,7 +1140,7 @@ IF C = 9 THEN 'run IF idemode THEN 'Darken fg/bg colors - DarkenFGBG 0 + dummy = DarkenFGBG(0) END IF sendc$ = CHR$(6) 'ready @@ -11915,7 +11915,7 @@ IF os$ = "WIN" THEN CHDIR "..\.." IF idemode THEN 'Restore fg/bg colors - DarkenFGBG 0 + dummy = DarkenFGBG(0) END IF END IF 'No_C_Compile_Mode=0 @@ -12203,7 +12203,7 @@ IF os$ = "LNX" THEN CHDIR "../.." IF idemode THEN 'Restore fg/bg colors - DarkenFGBG 0 + dummy = DarkenFGBG(0) END IF END IF