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 / Right Mouse Button in AGK

Author
Message
Uechi
18
Years of Service
User Offline
Joined: 2nd Sep 2006
Location:
Posted: 15th May 2012 00:40
How do I code a right mouse press in AppGameKit for Android and what would I do on the tablet to simulate the right mouse press.
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 15th May 2012 04:32
Remember that some commands are specific to desktop platforms such as win Mac and me ego.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th May 2012 07:10
Can you right click on an android? I wouldn't imagine so. You will have to use multi touch or some other method of I think. Get rawmousekeypressed or state will do it for PC.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 14:47
You could add a "virtual button" on the screen somewhere.

Uechi
18
Years of Service
User Offline
Joined: 2nd Sep 2006
Location:
Posted: 15th May 2012 16:27
Trying to do a Minesweeper clone and need to be able to do something to show potential bombs. In windows this is done by right mouse click.
Ashambles
12
Years of Service
User Offline
Joined: 9th May 2012
Location: Georgia, USA
Posted: 15th May 2012 16:47
You could use a long-touch by counting up how long the touch event is active and place your bomb-flag that way. Sort of like how iOS will spawn the magnifying glass and edit tools if you hold your touch down for a bit. For desktop, I guess that would translate into clicking and holding down the left mouse button.

Twitter: MuseHill
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 17:31 Edited at: 15th May 2012 17:32
There is an iOS Minesweeper clone and they have an icon that you press and drag to where you put the flag.

As a long time Minesweeper player (back to 1992 anyway), this is not a very satisfactory method and really affects your time AND they let you click on the flag marked spaces and lose the game.

Trying for multitouch can be tricky in small spaces (like the more difficult levels). The long touch method might work.

Cheers,
Ancient Lady
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 15th May 2012 17:39
How about a virtual button that you hold down to modify the touch press into flag placing mode?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th May 2012 17:43
"Taffy puller!"
"Hey, that was my idea!"
[/random charlie and the chocolate factory reference]

...but yes, just let a virtual button put you into flag placing mode then once a flag has been placed go back to normal mode.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 17:49
That sounds like a nice playable mode!

Uechi, that sounds good. I look forward to trying your version (I've uninstalled the other one).

Cheers,
Ancient Lady
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 15th May 2012 18:34
We have engineered AppGameKit specifically to gently steer you away from adding commands that do not convert well to other hardware or platforms. All tablets don't have right mouse buttons, and phones for that matter. Even some variants of Mac desktops have no right mouse button We do allow you to read the right mouse button, but through the appropriately named RAW commands, which are clear indicators that you are accessing RAW data from the platform and your app will NOT perform universally across all platforms.

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 16th May 2012 00:48
the RAW commands!
More please!

Login to post a reply

Server time is: 2024-11-23 11:47:27
Your offset time is: 2024-11-23 11:47:27