Jump to content

[WONTFIX] Order of events in the GUI.


photo

Recommended Posts

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.

post-696-0-12502500-1368610462_thumb.png

OrderEvent.rar

Link to comment
  • 2 weeks later...

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

post-696-0-30250700-1369926866_thumb.jpg

post-696-0-10787000-1369926875_thumb.jpg

Link to comment
×
×
  • Create New...