Jump to content
Sign in to follow this  
sakura_chan

Mouse and Joystick eventhandlers outside of a control

Recommended Posts

How can I add an eventhandler to the mouse outside of the map or a rsc? Just like during regular play when you click the mouse button or press a joystick button? I don't need the position or anything fancy, just a straight forward return of which button was pressed.

Share this post


Link to post
Share on other sites

add to the main display

waitUntil {sleep 0.01; (!(isNull (findDisplay 46)))};
(findDisplay 46) displayAddEventHandler ["MouseDown","_this call TAG_fnc_something"];

Share this post


Link to post
Share on other sites

Doesn't fire for mouse or joystick commands. Anyways I found a way around it without using the mouse buttons.

didn't see the edit.

Edited by Sakura_Chan

Share this post


Link to post
Share on other sites

Mouse works for me. You only cannot intercept, aka stop, mouse input like you can with keyboard input.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×