Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Add VirtualJoystick Problem

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 2nd Dec 2014 21:45
Hi.

I want check if keyboard is not exist create a virtual joystick by below code. but don't create VirtualJoystick. were is the Problem?

Thanks.

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 2nd Dec 2014 22:02
From the help files for GetKeyboardExists :

Quote: "Returns 1 if the current device has a full sized keyboard, 2 if the device has a virtual or mobile phone keyboard and 0 for no keyboard at all"


So chances are on your device it's returning a 2 as it's detecting a virtual keyboard, it did this on my phone so no virtual joystick was created.

So you probably want to change:

if keyboard = 0...

To

if keyboard <> 1...

Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 3rd Dec 2014 17:36
Yes, right.

Thanks

Login to post a reply

Server time is: 2024-11-25 11:42:59
Your offset time is: 2024-11-25 11:42:59