GP2X f200 touchscreen

Previous topic - Next topic

mookmac

does the mousestate command apply to the touchscreen on the GP2X f200? e.g. can i use the same code that works for the mouse on my pc to also work for the stylus on the gp2x? also is a tap on the screen relitive to button 1 on a mouse? hope its clear what im asking. thnaks for your help

Ian Price

Simple answer is yes. B1 (left mouse button) is the same as touching the screen.
I came. I saw. I played.

mookmac

how can i put in a pause which waits for either key or mouse press? i've tried mousewait but it only moves on with a mouse click.

D2O

I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

mookmac

not really, i need a way of getting the program to wait for either  a mouse click or a button press. But the only syntax (commands) i can find does only one or the other.

PeeJay

Code (glbasic) Select
IF DOESFILEEXIST("/dev/touchscreen/wm97xx")
MOUSEWAIT
ELSE
KEYWAIT
ENDIF
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Thunor

Code (glbasic) Select
FUNCTION inputwait:
LOCAL mx, my, mb1, mb2
LOCAL count, quit = FALSE

WHILE quit = FALSE
MOUSESTATE mx, my, mb1, mb2
IF mb1 = TRUE THEN quit = TRUE
FOR count = 0 TO 255
IF KEY(count) = TRUE THEN quit = TRUE
NEXT
WEND
ENDFUNCTION