vita_de Posted May 15, 2013 Share Posted May 15, 2013 A bug with the order of events on the stack for GUI ... Gui gui = engine.getGui(); WidgetButton btn1 = new WidgetButton(gui, "Button 1"); btn1.setCallback( GUI_ENTER, "onEnter", 1 ); btn1.setCallback( GUI_LEAVE, "onLeave", 1 ); gui.addChild(btn1); WidgetButton btn2 = new WidgetButton(gui, "Button 2"); btn2.setCallback( GUI_ENTER, "onEnter", 2 ); btn2.setCallback( GUI_LEAVE, "onLeave", 2 ); gui.addChild(btn2); ... void onEnter( int id ) { log.message("onEnter( 'Button %d' )\n", id); } void onLeave( int id ) { log.message("onLeave( 'Button %d' )\n", id); } Please see the result in the attached picture. OrderEvent.rar Link to comment
silent Posted May 17, 2013 Share Posted May 17, 2013 Thaks for the test scene! Issue is passed to the developers. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
vita_de Posted May 30, 2013 Author Share Posted May 30, 2013 Sorry. Please tell me what state the task? And when to expect to resolve it? How soon will the new version of the engine? Link to comment
frustum Posted May 30, 2013 Share Posted May 30, 2013 It's correct behaviour because widgets are updated from top to bottom. Link to comment
vita_de Posted May 30, 2013 Author Share Posted May 30, 2013 then here's another example of where better seen bug For example, the events in Flash (AS3). and a simple example of HTML + JS <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>EventOrder Bug</title> <script type="text/javascript"> function onEnter(btn) { log("onEnter('" + btn + "');"); } function onLeave(btn) { log("onLeave('" + btn + "');"); } function log(str) { var txt = document.getElementById('log'); txt.value = txt.value + "\n" + str; } </script> </head> <body> <br /> <br /> <button onmouseover="onEnter('Button 1')" onmouseout="onLeave('Button 1')">Button 1</button><br /> <button onmouseover="onEnter('Button 2')" onmouseout="onLeave('Button 2')">Button 2</button><br /> <button onmouseover="onEnter('Button 3')" onmouseout="onLeave('Button 3')">Button 3</button><br /> <br /> <br /> <br /> <textarea id="log" style="width: 220px; height: 110px;">Event log</textarea> </body> </html> We are experiencing difficulties with the implementation of the GUI in the game. Would not want to used crutches. OrderEvent.zip OrderEvent_flash.zip Link to comment
necris Posted June 4, 2013 Share Posted June 4, 2013 Vita_de,Sorry, but it really works the way it should be.It's really correct behaviour in our engine. Sorry for the inconvenience caused. Link to comment
Recommended Posts