mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 00:00:22 +00:00
Simpler quick key visual cue, using the status area
This commit is contained in:
parent
db20865a1d
commit
2f133204a2
|
@ -4885,39 +4885,22 @@ FUNCTION ide2 (ignore)
|
||||||
|
|
||||||
IF menu$(m, s) = "Insert Quick Keycode... Ctrl+K" THEN
|
IF menu$(m, s) = "Insert Quick Keycode... Ctrl+K" THEN
|
||||||
ideQuickKeycode:
|
ideQuickKeycode:
|
||||||
PCOPY 2, 0
|
DO: tempk = _KEYHIT: _LIMIT 30: LOOP UNTIL tempk = 0 'wait for key release
|
||||||
|
DO 'get the next key hit
|
||||||
tempimage = _NEWIMAGE(240, 120, 32)
|
PCOPY 3, 0
|
||||||
w = _WIDTH * _FONTWIDTH: h = _HEIGHT * _FONTHEIGHT
|
LOCATE idewy - 3, 2
|
||||||
d = _DEST: s = _SOURCE
|
PRINT "PRESS ANY KEY TO INSERT _KEYHIT/_KEYDOWN CODE"
|
||||||
_DEST tempimage
|
|
||||||
DO
|
|
||||||
tempk = _KEYHIT
|
|
||||||
_LIMIT 30
|
|
||||||
LOOP UNTIL tempk = 0
|
|
||||||
DO
|
|
||||||
CLS , &HFF000077
|
|
||||||
tempk = _KEYHIT
|
tempk = _KEYHIT
|
||||||
IF tempk > 0 THEN tempk$ = STR$(tempk)
|
IF tempk > 0 THEN tempk$ = STR$(tempk)
|
||||||
LINE (5, 5)-(115, 20), &HFF000000, BF
|
|
||||||
_PRINTSTRING (5, 5), "Keycode: " + k$
|
|
||||||
tempHWimage = _COPYIMAGE(tempimage, 33)
|
|
||||||
_PUTIMAGE (0, 0)-(w, h), tempHWimage
|
|
||||||
_DISPLAY
|
|
||||||
_LIMIT 30
|
_LIMIT 30
|
||||||
LOOP UNTIL tempk$ <> ""
|
LOOP UNTIL tempk$ <> ""
|
||||||
_AUTODISPLAY
|
|
||||||
tempk$ = tempk$ + " "
|
tempk$ = tempk$ + " "
|
||||||
_DEST d: _SOURCE s
|
a$ = idegetline(idecy)
|
||||||
_FREEIMAGE tempimage
|
|
||||||
l = idecy
|
|
||||||
a$ = idegetline(l)
|
|
||||||
l$ = LEFT$(a$, idecx - 1): r$ = RIGHT$(a$, LEN(a$) - idecx + 1)
|
l$ = LEFT$(a$, idecx - 1): r$ = RIGHT$(a$, LEN(a$) - idecx + 1)
|
||||||
text$ = l$ + tempk$ + r$
|
text$ = l$ + tempk$ + r$
|
||||||
idesetline l, text$
|
idesetline idecy, text$
|
||||||
idecx = idecx + len(tempk$)
|
idecx = idecx + len(tempk$)
|
||||||
idechangemade = 1
|
idechangemade = 1
|
||||||
|
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0: idewait4mous: idewait4alt
|
PCOPY 3, 0: SCREEN , , 3, 0: idewait4mous: idewait4alt
|
||||||
retval = 1
|
retval = 1
|
||||||
GOSUB redrawItAll
|
GOSUB redrawItAll
|
||||||
|
|
Loading…
Reference in a new issue