Gryphon_de Posted October 24, 2011 Posted October 24, 2011 Hi! I need to set a callback for widget that was created in script on right click. So Gui gui = engine.getGui(); string texture = "icon.dds"; WidgetIcon icon = new WidgetIcon( gui, texture ); icon.setCallback( GUI_CLICKED, "OnIconClicked" ); This callback runs only when I perform left-click on this widget. How can I set callback for right click?
frustum Posted October 24, 2011 Posted October 24, 2011 You can use PRESSED/RELEASED pair to handle any mouse button clicks. RELEASED callback will be available in the upcoming SDK.
Gryphon_de Posted October 25, 2011 Author Posted October 25, 2011 You can use PRESSED/RELEASED pair to handle any mouse button clicks. RELEASED callback will be available in the upcoming SDK. icon.setCallback( GUI_PRESSED, "OnIconClicked" ); This code doesn't reacts on RMB too(
steve3d Posted October 25, 2011 Posted October 25, 2011 Is there a way to get the callback from other buttons? There are some mouse has more than 3 buttons, if user want a callback from these buttons, then how should we do this?
frustum Posted October 26, 2011 Posted October 26, 2011 Four auxiliary mouse buttons also will be added.
steve3d Posted October 26, 2011 Posted October 26, 2011 Great! Unigine are becoming more and more powerful
Recommended Posts