Hallo,
hier ein weiteres Problem: Ich möchte bei meiner GP2X Caanoo den joystick ansteuern, doch ich weiß nicht, wie das gehen soll. Auch hier funktionieren die Beispiele nicht :'(
Deshalb, wie funktionieren die Ansteuerungen für den Joystick und die übrigen Tasten?
Über einen Code währe ich sehr glücklich!!!
TheCoder2000
there is some code to read the joystick and buttons here:
http://www.glbasic.com/forum/index.php?topic=7197.msg60150#msg60150
Some joy/button values might have changed, but you can figure them by running the code too.
Hope it helps. ;)
Oh, wow! Thank's a lot! Is there also a code for the touchscreen?
I didn´t do the touch yet.
But that code has the g-sensor reading too :good:
Can you make a program for the Touchscreen, please? Or is it impossible?
It may take a while as I never did it.
But it is simple I guess, it is the same code to deal mouse on desktops. ;)
The touchscreen just uses the mouse position, using MOUSESTATE
LOCAL mx,my,b1,b2
WHILE TRUE
MOUSESTATE mx,my,b1,b2
IF b1 THEN DRAWRECT mx,my,16,16,RGB(255,255,255)
SHOWSCREEN
WEND
hehe thanks Ian.
and I thought it was gonna take me a while :-[
Ian´s code works perfectly out of the box! :good:
I added a setscreen 320,240,0 to the start of it but I suspect this is actually not needed when your project is set to caanoo compile (but I´m not sure, so I added anyways).
Great precision on the touch side of things :)
Now I´m surprised by the size of the code and double ashamed for thinking it would take time to do :-[ :-[
[attachment deleted by admin]
No need to over-complicate these things :)