Dmitry.Vorobiov Posted November 21, 2012 Share Posted November 21, 2012 У нас есть 2 gui. 1 - flash, входной интерфейс, из которого мы загружаем мир. 2 - ui-based интерфейс, который находится в загружаемом мире. При запуске мира отдельно - второй интерфейс работает нормально. При запуске мира из под flash - интерфейса, второе меню не отображается. запускаем при помощи Engine.worldCall("engine.console.run", "world_load mamison_main_v2"). Что мы сделали неправильно? We have 2 gui. 1 - flash, intro- interface from which we load the world. 2 - ui-based interface, which is located in the load world. When we run the world standalone - the second interface is working properly. When we run the world from a flash -interface, the second menu is don't displayed. (run by Engine.worldCall ("engine.console.run", "world_load mamison_main_v2").) What did we wrong? class Window_help { Window_help instance; // current instance UserInterface ui; // user interface WidgetHBox hbox; // window hbox WidgetSprite but_quit; Window_help(string temp_name) { instance = this; ui = engine.gui.addUserInterface(engine.getGui(),"mamison/scripts/gui/window_help.ui"); Gui gui = engine.getGui(); gui.addChild(hbox,GUI_ALIGN_OVERLAP); hbox.setPosition(200,200); } void enter_quit() { but_quit.setTexCoord(vec4(0.0f,0.25f,1.0f,0.5f)); } void clicked_quit() { but_quit.setTexCoord(vec4(0.0f,0.5f,1.0f,0.75f)); log.message("bye-bye\n"); gui_h.removeChild(hbox); } void leave_quit() { but_quit.setTexCoord(vec4(0.0f,0.0f,1.0f,0.25f)); } void callback_redirector(string func,Window_help window) { window.call(func); } }; Link to comment
manguste Posted November 27, 2012 Share Posted November 27, 2012 Could you send us a small test scene (or attach it here) so we can check it? Link to comment
Recommended Posts