From 99e0b539af797076e428195c33f36d84b1ea905a Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sun, 17 Jul 2016 17:17:51 -0300 Subject: [PATCH] Cosmetic: Darken the interface while G++ is being run. Uses _PALETTECOLOR to change the background of the IDE to a darker shade while external compilation is taking place, to give a sense of temporary unavailability. --- source/ide/ide_methods.bas | 9 +++++++++ source/qb64.bas | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 21c0b8ad6..40d2a8b4f 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -183,6 +183,11 @@ IF LEFT$(c$, 1) = CHR$(12) THEN 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 + 'Darken the interface while compilation is taking place, + 'to give a sense of temporary unavailability: + TempDarkerColor~& = _RGB32(_RED32(IDEBackgroundColor) * .5, _GREEN32(IDEBackgroundColor) * .5, _BLUE32(IDEBackgroundColor) * .5) + _PALETTECOLOR 1, TempDarkerColor~&, 0 + IF os$ = "LNX" THEN PRINT "Creating executable file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." ELSE @@ -1340,6 +1345,10 @@ DO LOCATE idewy - 3, 2: PRINT "Starting program..."; ELSE + 'Darken the interface while compilation is taking place, + 'to give a sense of temporary unavailability: + TempDarkerColor~& = _RGB32(_RED32(IDEBackgroundColor) * .5, _GREEN32(IDEBackgroundColor) * .5, _BLUE32(IDEBackgroundColor) * .5) + _PALETTECOLOR 1, TempDarkerColor~&, 0 IF os$ = "LNX" THEN LOCATE idewy - 3, 2: PRINT "Creating executable file..."; diff --git a/source/qb64.bas b/source/qb64.bas index a00765f50..08fdac041 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -11901,6 +11901,10 @@ IF os$ = "WIN" THEN CHDIR ".\internal\c" SHELL _HIDE a$ CHDIR "..\.." + IF idemode THEN + 'Restore background color + _PALETTECOLOR 1, IDEBackgroundColor, 0 + END IF END IF 'No_C_Compile_Mode=0 END IF @@ -12185,6 +12189,10 @@ IF os$ = "LNX" THEN CHDIR "./internal/c" SHELL _HIDE a$ CHDIR "../.." + IF idemode THEN + 'Restore background color + _PALETTECOLOR 1, IDEBackgroundColor, 0 + END IF END IF IF INSTR(_OS$, "[MACOSX]") THEN