I want to make a unit selected when left mouse button clicked, and move when right mouse button clicked, but I can't find about how to check what mouse button pressed.
@Panzerbruder, at this time Gideros is a Mobile Development Framework and the only thing that you can use on touch screen devices is a touch. It does not discriminate against your left or right finger (though some android devices can be used with a mouse). So till Gideros add the Desktop support, touches do not have a left/right mouse button, just a mouse button.
In regards to your issue, you might want to change the way you manage things with touch. Have a look at Red Alert for example to get an idea of how strategy games are managed on touch devices.
Comments
at this time Gideros is a Mobile Development Framework and the only thing that you can use on touch screen devices is a touch. It does not discriminate against your left or right finger (though some android devices can be used with a mouse). So till Gideros add the Desktop support, touches do not have a left/right mouse button, just a mouse button.
In regards to your issue, you might want to change the way you manage things with touch. Have a look at Red Alert for example to get an idea of how strategy games are managed on touch devices.
Likes: Panzerbruder
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
So I have to make GUIs first...