Gryphon_de Posted October 24, 2011 Share 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? Link to comment
frustum Posted October 24, 2011 Share 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. Link to comment
Gryphon_de Posted October 25, 2011 Author Share 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( Link to comment
manguste Posted October 25, 2011 Share Posted October 25, 2011 Our devs will add RMB support. Link to comment
Gryphon_de Posted October 25, 2011 Author Share Posted October 25, 2011 Thanks, we'll wait for it) Link to comment
steve3d Posted October 25, 2011 Share 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? Link to comment
frustum Posted October 26, 2011 Share Posted October 26, 2011 Four auxiliary mouse buttons also will be added. Link to comment
steve3d Posted October 26, 2011 Share Posted October 26, 2011 Great! Unigine are becoming more and more powerful Link to comment
Recommended Posts