mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 17:00:26 +00:00
Add a percentage bar to the status line while still compiling (F5/F11).
Also: Progress has been grouped. No longer "Step 1/2" then "Step 2/2". It goes from 0% to 100% and that's that.
This commit is contained in:
parent
e6d11d7820
commit
6f4231c86b
|
@ -3,5 +3,5 @@ DIM SHARED BuildNum AS STRING
|
|||
Version$ = "1.000"
|
||||
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
||||
'integer. If you make a change, update the date and increase the id!
|
||||
BuildNum$ = "20160524/15"
|
||||
BuildNum$ = "20160524/16"
|
||||
|
||||
|
|
|
@ -93,15 +93,15 @@ IF ASC(idecommand$) = 3 THEN 'request next line (compiler->ide)
|
|||
idereturn$ = idecompiledline$
|
||||
|
||||
'Update compilation progress on the status bar
|
||||
IF IdeSystem <> 3 AND ideautorun <> 0 THEN
|
||||
status.progress$ = str2$(INT((idecompiledline * 100) / iden))
|
||||
status.progress$ = STRING$(3 - LEN(status.progress$), 32) + status.progress$ + "%)"
|
||||
IF ideautorun <> 0 THEN
|
||||
IF prepass THEN
|
||||
status.progress$ = "Step 1/2 (" + status.progress$
|
||||
status.progress$ = str2$(INT((idecompiledline * 100) / (iden * 2)))
|
||||
status.progress$ = STRING$(3 - LEN(status.progress$), 32) + status.progress$ + "%"
|
||||
ELSE
|
||||
status.progress$ = "Step 2/2 (" + status.progress$
|
||||
status.progress$ = str2$(INT(((iden + idecompiledline) * 100) / (iden * 2)))
|
||||
status.progress$ = STRING$(3 - LEN(status.progress$), 32) + status.progress$ + "%"
|
||||
END IF
|
||||
IdeInfo = status.progress$
|
||||
IdeInfo = CHR$(0) + status.progress$
|
||||
END IF
|
||||
UpdateIdeInfo
|
||||
|
||||
|
@ -852,7 +852,7 @@ DO
|
|||
IF idechangemade 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
|
||||
|
||||
IF LEFT$(IdeInfo, 5) = "Step " THEN IdeInfo = ""
|
||||
IdeInfo = ""
|
||||
|
||||
LOCATE idewy - 3, 2: PRINT "..."; 'assume new compilation will begin
|
||||
END IF
|
||||
|
@ -911,7 +911,7 @@ DO
|
|||
END IF
|
||||
NEXT
|
||||
'Help_Search_Str
|
||||
IF IdeSystem = 3 THEN
|
||||
IF IdeSystem = 3 AND LEFT$(IdeInfo, 1) <> CHR$(0) THEN
|
||||
a$ = ""
|
||||
IF LEN(Help_Search_Str) THEN
|
||||
a$ = Help_Search_Str
|
||||
|
@ -921,10 +921,8 @@ DO
|
|||
ELSE
|
||||
IdeInfo = "Start typing to search for text in this help page"
|
||||
END IF
|
||||
ELSE
|
||||
IdeInfo = ""
|
||||
UpdateIdeInfo
|
||||
END IF
|
||||
UpdateIdeInfo
|
||||
ELSE
|
||||
Help_Search_Str = ""
|
||||
END IF
|
||||
|
@ -12633,6 +12631,16 @@ END SUB
|
|||
|
||||
SUB UpdateIdeInfo
|
||||
'show info message (if any)
|
||||
IF LEN(IdeInfo) THEN
|
||||
IF ASC(IdeInfo, 1) = 0 THEN
|
||||
'Show progress bar
|
||||
IdeInfo = MID$(IdeInfo, 2)
|
||||
Percentage% = VAL(MID$(IdeInfo, 1, 3))
|
||||
COLOR 13, 1
|
||||
LOCATE idewy - 1, 2
|
||||
PRINT STRING$(((idewx - 2) * Percentage%) / 100, "_");
|
||||
END IF
|
||||
END IF
|
||||
a$ = IdeInfo
|
||||
IF LEN(a$) > 60 THEN a$ = LEFT$(a$, 57) + string$(3, 250)
|
||||
IF LEN(a$) < 60 THEN a$ = a$ + SPACE$(60 - LEN(a$))
|
||||
|
|
Loading…
Reference in a new issue