04-22-2012 10:06 PM
I want to be able to click on things in the simulator and get the x/y coordinates, etc.
When I click things in the simulator, I get SCREEN_EVENT_POINTER events rather than SCREEN_EVENT_MTOUCH_TOUCH events.
I expect I can do:
screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_POSITION, ...);
But I can't seem to find any documentation that says what type of struct needs to be passed as the last argument.
This appears to be the most relevant documentation:
... but it doesn't make any indication.
04-23-2012 11:55 AM
my guess is you should use
screen_get_event_property_pv()
and interpreting results as an array of two long integers.
04-24-2012 06:36 AM
Gave that a try, but no such luck. Thanks for the suggestion.
04-24-2012 10:52 AM
When using SCREEN_PROPERTY_POSITION, it expects an array of 2 integers to be passed as the last argument.
04-24-2012 10:55 AM
04-24-2012 10:56 AM
>When using SCREEN_PROPERTY_POSITION, it expects an array of 2 integers to be passed as the last argument.
Like:
int x[2]; screen_get_event_property_pv( ev, pname, &x );
right?