Page 1 of 1

TouchOnScreen

Posted: Mon Nov 04, 2013 4:33 am
by Joyzpa
Hello!

New to the forum so i hope this is in right place ;)

I need a bit of help in scripting.

I would like to run a script every time there is a MouseDown on screen. And i mean that this MouseDown doesn't have to be on any object like button. So when i put my finger anywhere on the screen this MouseDown event handler would trigger and run my script.

Is there this kind of "system" MouseDown trigger already in the IX or can it be created?

Joyzpa

Re: TouchOnScreen

Posted: Tue Jan 21, 2020 3:29 pm
by Russ C.
in iX Developer you can hook into a Global MouseDown event using something:

Code: Select all

void OnScreenOpened(){
MouseDown += MyCustomMouseDown_Function;
}

Make sure to unhook if the screen closes to prevent memory leaks:

Code: Select all

void OnScreenClosed(){
MouseDown -= MyCustomMouseDown_Function;
}