Have you tried using the
AddVirtualButton button function, it will do the work for you...
You can customise the button with functions like:
SetVirtualButtonSize
SetVirtualButtonPosition
SetVirtualButtonImageUp
SetVirtualButtonImageDown
You can get the state of the button with functions like:
GetVirtualButtonState
GetVirtualButtonPressed
GetVirtualButtonReleased
There are examples in the examples/input/virtualbuttons folder
Hope this helps
==================================================
you gotta live to survive to be a hundred and five
==================================================