blitzbasic
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
*NEW*
Current Version:
10.283
Logfile:
EN
,
DE
Home
Help
Search
Blogs
Login
Register
GLBasic forum
»
Other languages
»
GLBasic - de
»
GP2X Caanoo Joystick ansteuern
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: GP2X Caanoo Joystick ansteuern (Read 567 times)
TheCoder
Mc. Print
Posts: 7
Immer zuversichtlich bleiben!
GP2X Caanoo Joystick ansteuern
«
on:
2012-Jun-11 »
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
Logged
Viele Grüße, TheCoder
Kinds of regards, TheCoder
erico
Prof. Inline
Posts: 1990
Re: GP2X Caanoo Joystick ansteuern
«
Reply #1 on:
2012-Jun-11 »
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.
Logged
http://sites.google.com/site/ericomont/
TheCoder
Mc. Print
Posts: 7
Immer zuversichtlich bleiben!
Re: GP2X Caanoo Joystick ansteuern
«
Reply #2 on:
2012-Jun-11 »
Oh, wow! Thank's a lot! Is there also a code for the touchscreen?
Logged
Viele Grüße, TheCoder
Kinds of regards, TheCoder
erico
Prof. Inline
Posts: 1990
Re: GP2X Caanoo Joystick ansteuern
«
Reply #3 on:
2012-Jun-11 »
I didn´t do the touch yet.
But that code has the g-sensor reading too
Logged
http://sites.google.com/site/ericomont/
TheCoder
Mc. Print
Posts: 7
Immer zuversichtlich bleiben!
Re: GP2X Caanoo Joystick ansteuern
«
Reply #4 on:
2012-Jun-11 »
Can you make a program for the Touchscreen, please? Or is it impossible?
Logged
Viele Grüße, TheCoder
Kinds of regards, TheCoder
erico
Prof. Inline
Posts: 1990
Re: GP2X Caanoo Joystick ansteuern
«
Reply #5 on:
2012-Jun-11 »
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.
Logged
http://sites.google.com/site/ericomont/
Ian Price
Global Moderator
Prof. Inline
Posts: 3122
On the shoulders of giants.
Re: GP2X Caanoo Joystick ansteuern
«
Reply #6 on:
2012-Jun-12 »
The touchscreen just uses the mouse position, using MOUSESTATE
Code: GLBasic
[Select]
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
Logged
I came. I saw. I played.
erico
Prof. Inline
Posts: 1990
Re: GP2X Caanoo Joystick ansteuern
«
Reply #7 on:
2012-Jun-12 »
hehe thanks Ian.
and I thought it was gonna take me a while
Logged
http://sites.google.com/site/ericomont/
erico
Prof. Inline
Posts: 1990
Re: GP2X Caanoo Joystick ansteuern
«
Reply #8 on:
2012-Jun-12 »
Ian´s code works perfectly out of the box!
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
«
Last Edit: 2012-Jun-12 by erico
»
Logged
http://sites.google.com/site/ericomont/
Ian Price
Global Moderator
Prof. Inline
Posts: 3122
On the shoulders of giants.
Re: GP2X Caanoo Joystick ansteuern
«
Reply #9 on:
2012-Jun-12 »
No need to over-complicate these things
Logged
I came. I saw. I played.
Print
Pages: [
1
]
Go Up
« previous
next »
GLBasic forum
»
Other languages
»
GLBasic - de
»
GP2X Caanoo Joystick ansteuern