Richard Ashbery
2020-11-13 13:17:57 UTC
Are there any BASIC programmers out there who may have missed my
posting on ROOL > Forums > General about an issue with a routine that
simply animates a rectangular cursor across the screen by moving the
mouse? The mouse overlays another horizontal rectangle but in so doing
results in instability and spoils the rendering. Any solutions would
be welcome.
MODE 1920,1080,32
PX%=0
PY%=0
REPEAT
GCOL 0,0,255
RECTANGLE FILL 0,0,3838,100
MOUSE MX%,MY%,MB%
GCOL 255,0,0
RECTANGLE FILL PX%-50,PY%,100
IF MX%<PX% THEN : PX%=PX%-1 : ENDIF
IF MX%>PX% THEN : PX%=PX%+1 : ENDIF
UNTIL0
posting on ROOL > Forums > General about an issue with a routine that
simply animates a rectangular cursor across the screen by moving the
mouse? The mouse overlays another horizontal rectangle but in so doing
results in instability and spoils the rendering. Any solutions would
be welcome.
MODE 1920,1080,32
PX%=0
PY%=0
REPEAT
GCOL 0,0,255
RECTANGLE FILL 0,0,3838,100
MOUSE MX%,MY%,MB%
GCOL 255,0,0
RECTANGLE FILL PX%-50,PY%,100
IF MX%<PX% THEN : PX%=PX%-1 : ENDIF
IF MX%>PX% THEN : PX%=PX%+1 : ENDIF
UNTIL0