QB64.org Forum
Active Forums => Programs => Topic started by: NOVARSEG on February 06, 2021, 11:36:44 pm
-
Trying to get the LOCATE cursor working with larger screen
LOCATE 26, 27: PRINT "A"
LOCATE 26, 27, 1, 31, 31
see the cursor blinking under the A but I want to make the screen larger and still see the cursor
*****
This works but what about other screen modes / sizes?
_FULLSCREEN
LOCATE 26, 27: PRINT "A"
LOCATE 26, 27, 1, 31, 3
*****
For example
SCREEN _NEWIMAGE(1024, 768, 32)
LOCATE 26, 27: PRINT "A"
LOCATE 26, 27, 1, 31, 31
shows the letter but not the cursor
****
Whoops sorry this works
_FULLSCREEN
LOCATE 26, 27, 0
PRINT "A"
LOCATE 26, 27, 1, 31, 31
DO
IF INKEY$ <> "" THEN EXIT DO
LOOP
-
some code to try
_TITLE "Move cursor with LOCATE. Press ESC to exit"
-
I use...
Cursor hide: LOCATE , , 0
Cursor show: LOCATE , , 1
Also I use use LOCATE , , 1, 7, 0 (hide) LOCATE , , 1, 7, 7 (underline) or LOCATE , , 1, 7, 30 (block) or LOCATE , , 1, 7, 2 (rectangle).
There are other end values that affect the cursor height. 8 is double of 7 and 9 is triple of 7, a fairly thick underscore. 10 is the same as 30. 2 is a tall block. Since some of the numbers produce the same results like 30 and 31, I suppose it's just up to the user to pick a preference.
Pete
Pete
-
_TITLE "Move cursor with LOCATE. Press ESC to exit"
n$ = "1357364"