hintuc_de Posted July 26, 2011 Share Posted July 26, 2011 WidgetWindow isn't resizedUnigineScript WidgetWindow exampleWin; ... exampleWin.setWidth(100); exampleWin.setHeight(100); xml (User Interface file) <window name="Test::exampleWin" width="100" height="100"> <text>exapmple</text> </window> Link to comment
Guest mrred Posted July 28, 2011 Share Posted July 28, 2011 This is a peculiar feature of a window. You can control its size only if you set parameter sizeable="1", but in this case user can control its size too. Alternatively, you can use a widget container to control a window size. string UI_PATH = "test/test6.ui"; Gui gui; UserInterface ui; WidgetVBox container; WidgetWindow exampleWin; /* */ int init() { gui = engine.getGui(); ui = engine.gui.addUserInterface(gui,UI_PATH); container.setWidth(200); container.setHeight(400); gui.addChild(exampleWin); return 1; } <?xml version="1.0" encoding="utf-8"?> <ui version="1.0"> <window name="exampleWin" export="1" snap_distance="16"> <text>exapmple</text> <vbox name="container" export="1" width="300" height="300"> </vbox> </window> </ui> Link to comment
vita_de Posted April 30, 2013 Share Posted April 30, 2013 And you can lock the scale of one of the sides of the window, or change the size to the maximum value? For example in a chat in horizontal window does not change size, but on the vertical of the possible. Link to comment
frustum Posted June 24, 2013 Share Posted June 24, 2013 Maximum window size parameter will be added. Link to comment
Recommended Posts