1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00

Add ClearMouse method to ide_methods.bas

Allows exiting dialog boxes without stray clicks.
This commit is contained in:
FellippeHeitor 2021-09-27 23:29:59 -03:00
parent 8e09f14e7f
commit 8079fc3d07

View file

@ -8685,12 +8685,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
END IF END IF
NEXT NEXT
IF LEN(variableWatchList$) THEN MID$(variableWatchList$, 5, 4) = MKL$(totalVisibleVariables) IF LEN(variableWatchList$) THEN MID$(variableWatchList$, 5, 4) = MKL$(totalVisibleVariables)
IF mousedown THEN ClearMouse
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
@ -9348,10 +9343,7 @@ FUNCTION ideelementwatchbox$(currentPath$, elementIndexes$, level, singleElement
ideelementwatchbox$ = returnList$ ideelementwatchbox$ = returnList$
END IF END IF
DO UNTIL mCLICK = 0 ClearMouse
GetInput
_LIMIT 100
LOOP
EXIT FUNCTION EXIT FUNCTION
END IF END IF
@ -9783,13 +9775,7 @@ FUNCTION idecallstackbox
idecy = idegotobox_LastLineNum idecy = idegotobox_LastLineNum
idecentercurrentline idecentercurrentline
ideselect = 0 ideselect = 0
ClearMouse
IF mousedown THEN
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
END IF END IF
@ -11392,24 +11378,14 @@ FUNCTION ideinputbox$(title$, caption$, initialvalue$, validinput$, boxwidth, ma
END IF END IF
IF K$ = CHR$(27) OR (focus = 3 AND info <> 0) THEN IF K$ = CHR$(27) OR (focus = 3 AND info <> 0) THEN
IF mousedown THEN ClearMouse
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
IF K$ = CHR$(13) OR (focus = 2 AND info <> 0) THEN IF K$ = CHR$(13) OR (focus = 2 AND info <> 0) THEN
ideinputbox$ = idetxt(o(1).txt) ideinputbox$ = idetxt(o(1).txt)
ok = -1 ok = -1
IF mousedown THEN ClearMouse
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
'end of custom controls 'end of custom controls
@ -13078,12 +13054,7 @@ FUNCTION idesubs$
IF K$ = CHR$(27) OR (focus = 5 AND info <> 0) THEN IF K$ = CHR$(27) OR (focus = 5 AND info <> 0) THEN
idesubs$ = "C" idesubs$ = "C"
GOSUB SaveSortSettings GOSUB SaveSortSettings
IF mousedown THEN ClearMouse
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
@ -13101,12 +13072,7 @@ FUNCTION idesubs$
idesx = 1 idesx = 1
GOSUB SaveSortSettings GOSUB SaveSortSettings
IF mousedown THEN ClearMouse
DO
GetInput
_LIMIT 100
LOOP UNTIL mRELEASE
END IF
EXIT FUNCTION EXIT FUNCTION
END IF END IF
@ -15020,10 +14986,7 @@ FUNCTION idemessagebox (titlestr$, messagestr$, buttons$)
IF K$ = CHR$(13) OR (info <> 0) THEN IF K$ = CHR$(13) OR (info <> 0) THEN
idemessagebox = focus idemessagebox = focus
DO UNTIL mCLICK = 0 ClearMouse
GetInput
_LIMIT 100
LOOP
EXIT FUNCTION EXIT FUNCTION
END IF END IF
'end of custom controls 'end of custom controls
@ -16843,7 +16806,16 @@ SUB GetInput
LOOP LOOP
END SUB END SUB
SUB ClearMouse
iCHANGED = 0
mB = 0
mB2 = 0
mCLICK = 0
mRELEASE = 0
DO WHILE _MOUSEBUTTON(1) OR _MOUSEBUTTON(2)
i = _MOUSEINPUT
LOOP
END SUB
SUB Help_ShowText SUB Help_ShowText