ExBemined Posted July 6, 2015 Posted July 6, 2015 When you have one of the WidgetManipulator that is disabled, all the mouse interaction breaks down as soon as you click on it. To reproduce: WidgetManipulatorTranslator wm = new WidgetManipulatorTranslator( engine.getGui() ); wm.setEnabled(false); WidgetButton wb = new WidgetButton( engine.getGui(), "Hodor" ); engine.gui.addChild( wb, GUI_ALIGN_OVERLAP ); engine.gui.addChild( wm, GUI_ALIGN_OVERLAP ); And of course feed the camera projection and view to wm so it becomes visible and you can click on it. After starting, you can click the button without problems. But as soon as you try to click on the manipulator, the button stops working. My findings (had to do some debugging before I realized it was caused by the widget being disabled): Widget::check_default_callbacks has some fancy "disable callback" logic that sets mouse_grab to 1 when widget is disabled and you click on it. WidgetManipulatorTranslator::checkCallbacks sets focus to NULL if widget is disabled. Widget::check_default_callbacks never releases mouse_grab anymore since widget no longer has focus. All other widgets ignore the clicks since mouse_grab is now set to 1 without anyone having focus. Happens with the latest SDK, 2.0 RC.
silent Posted July 6, 2015 Posted July 6, 2015 Hi Michiel, Thank you for the detailed description! I've successfully reproduced this issue and added it to our internal bug tracker. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
silent Posted July 13, 2015 Posted July 13, 2015 Fixed. Bugfix will be available in the next SDK update. In the meantime you can patch source/engine/gui/widgets/WidgetManipulatorTranslator.cpp at line 102 (checkCallbacks(int x,int y) method) and add following code: if (isEnabled() == 0) { return; } Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts