lars.saalbach Posted March 17, 2013 Share Posted March 17, 2013 Hey Unigine, in attachment you'll find a sample project to reproduce this error. Error explanation: If i try to change the video mode: engine.console.setInt( "video_mode", 3 ); And after this I restart the engine with: engine.console.run ( "video_restart" ); The project is reloaded and the size of the frame is restartet but the problem is that: engine.app.getWidth / engine.app.getHeight Isn't updatet. The width and height are just updated after a second press on the button which is attached, but not with the first one - which should be so? I found a work around with trigger: engine.console.run("world_reload"); But I realy don't know in which issues we run with this call, and at all the whole project is reloaded and not just the video. A fast feedback and solution would be very good. Thanks & Greetings Lars roa.rar Link to comment
frustum Posted March 17, 2013 Share Posted March 17, 2013 Try to call engine.console.flush() function after run("video_restart"). Link to comment
lars.saalbach Posted March 17, 2013 Author Share Posted March 17, 2013 Hey Frustum, thanks this worked for dynamic written "CENTER-My-Widget" code. But if I add widgets like this: gui.addChild ( box, GUI_ALIGN_OVERLAP | GUI_ALIGN_CENTER); It isn't be centred at all. If I run "world_reload" its going to be centred.Any advice or do I realy need to calculate the center behind and set it with X/Y? Greetings Lars Link to comment
lars.saalbach Posted March 29, 2013 Author Share Posted March 29, 2013 Push. News updates for this case? Greetings. Link to comment
necris Posted April 3, 2013 Share Posted April 3, 2013 Lars, Our devs are still getting to the root of this issue. Sorry for keeping you waiting, but we need more time. Link to comment
lars.saalbach Posted April 3, 2013 Author Share Posted April 3, 2013 Hey necris, thanks for Feedback. No Problem at all, I did it at the moment with a workarround (calculating myself), but our gui is growing and growing and if those problems need to be handeld self in the code is just going to be blown up. So all good - just wanted to stay tuned whats going on :) Greetings Lars Link to comment
frustum Posted April 5, 2013 Share Posted April 5, 2013 You call bottomTexture.setWidth(engine.app.getWidth()) function after gui.addChild(myHBox, GUI_ALIGN_OVERLAP | GUI_ALIGN_CENTER). GUI_ALIGN_CENTER flag doesn't perform per-frame update of coordinates. This flag is used only inside Gui::addChild function for the first time positioning. Link to comment
lars.saalbach Posted April 7, 2013 Author Share Posted April 7, 2013 Hi Frustrum, ok If the GUI_ALIGN_CENTER is just triggered in first time I understand this, but if we're restarting the VIDEO e.g. cause higher / lower resolution we completely dismiss the GUI and build it up anew. So there should work the "GUI_ALIGN_CENTER" or am I'm wrong? (Cause this isn't working) Thanks & Greetings Lars Link to comment
frustum Posted April 11, 2013 Share Posted April 11, 2013 GUI_ALIGN_CENTER was designed for initial window placement. It will be impossible to move windows with active per-frame widget centering. You have to handle widgets positions in script manually. Link to comment
lars.saalbach Posted April 11, 2013 Author Share Posted April 11, 2013 Hey Frustum, ok thanks for detailed explanation :) So case can be closed. Greetings Lars Link to comment
Recommended Posts