mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-08 00:55:14 +00:00
Show progress bar if building var list takes too long
This commit is contained in:
parent
bb49863f39
commit
7f49d223cd
|
@ -8159,7 +8159,9 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
searchTerm$ = filter$
|
searchTerm$ = filter$
|
||||||
|
firstRun = -1
|
||||||
GOSUB buildList
|
GOSUB buildList
|
||||||
|
firstRun = 0
|
||||||
dialogHeight = (totalMainVariablesCreated) + 7
|
dialogHeight = (totalMainVariablesCreated) + 7
|
||||||
listBuilt:
|
listBuilt:
|
||||||
i = 0
|
i = 0
|
||||||
|
@ -9126,9 +9128,29 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
IF thisLen > maxVarLen THEN maxVarLen = thisLen
|
IF thisLen > maxVarLen THEN maxVarLen = thisLen
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
|
IF firstRun THEN
|
||||||
|
idepar p, 60, 1, "Building Variable List..."
|
||||||
|
END IF
|
||||||
|
|
||||||
l$ = ""
|
l$ = ""
|
||||||
totalVisibleVariables = 0
|
totalVisibleVariables = 0
|
||||||
FOR x = 1 TO totalVariablesCreated
|
FOR x = 1 TO totalVariablesCreated
|
||||||
|
|
||||||
|
IF firstRun THEN
|
||||||
|
idedrawpar p
|
||||||
|
COLOR 0, 7
|
||||||
|
c = totalVariablesCreated
|
||||||
|
n = x
|
||||||
|
|
||||||
|
maxprogresswidth = 52 'arbitrary
|
||||||
|
percentage = INT(n / c * 100)
|
||||||
|
percentagechars = INT(maxprogresswidth * n / c)
|
||||||
|
percentageMsg$ = STRING$(percentagechars, 219) + STRING$(maxprogresswidth - percentagechars, 176) + STR$(percentage) + "%"
|
||||||
|
_PRINTSTRING (p.x + (p.w \ 2 - LEN(percentageMsg$) \ 2) + 1, p.y + 1), percentageMsg$
|
||||||
|
|
||||||
|
PCOPY 1, 0
|
||||||
|
END IF
|
||||||
|
|
||||||
IF usedVariableList(x).includedLine THEN _CONTINUE 'don't add variables in $INCLUDEs
|
IF usedVariableList(x).includedLine THEN _CONTINUE 'don't add variables in $INCLUDEs
|
||||||
|
|
||||||
IF LEN(searchTerm$) THEN
|
IF LEN(searchTerm$) THEN
|
||||||
|
|
Loading…
Reference in a new issue