touchscreen commands

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

touchscreen commands

Post by SwordPlay »

How is touch-screen supported?
I think I recall that it uses the mouse commands. Is that right?
How does left/right click work?
Would you ever consider adding special buttons for touch-screen devices to simulate the buttons for left/right click?
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Yes, you just use the mouse commands. Touching the screen counts as left mouse button down. You can't move the mouse position without left button down. I don't think there's a right button (unless two fingers does that? I don't have a multitouch phone to test on. I doubt it)
You can use one of the on-screen buttons to replace a right mouse click. If you have a mouse in your game you will certainly need to modify the game's interface a little around being usable on a touchscreen, even if it's just to not draw a mouse cursor.
Last edited by TMC on Sun Sep 17, 2017 2:22 am, edited 4 times in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

On Android, yes, two finger touch screen is a right-click.

If you mean a touch screen on a laptop, and not an Android device, then your mileage may vary
Post Reply