Search the Community
Showing results for tags 'vbox'.
-
Can I add a child WidgetVBox to a parent Unigine::Widgets::VBox? Example: Gui gui = engine.getGui(); WidgetVBox childVB = new WidgetVBox(gui); Unigine::Widgets::VBox parentVB = new Unigine::Widgets::VBox(); parentVB.addChild(childVB); // Error: Machine::do_callucfv(): "WidgetVBox 02e4f920 internal (12:21:21)" is not a user class If so, how?
- 2 replies
-
- Widget
- WidgetVBox
-
(and 4 more)
Tagged with:
-
Hi all, given the following ui file: <?xml version="1.0" encoding="utf-8"?> <ui version="1.0"> <vbox name="PlayModeUI::panel" export="1"> <sprite name="PlayModeUI::base_gauge" export="1" pos_x="72" pos_y="0" color="#ffffff" texture="navantia3d/gui/play_gauge_base.png" align="overlap,background,fixed"/> <icon pos_x="0" pos_y="55" texture="navantia3d/gui/play_shutdown_console.png" align="overlap"/> <icon pos_x="216" pos_y="13" texture="navantia3d/gui/play_field_1.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="56" texture="navantia3d/gui/play_field_2.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="97" texture="navantia3d/gui/play_field_3.png" align="overlap,background,fixed"/> <icon pos_x="216" pos_y="138" texture="navantia3d/gui/play_field_4.png" align="overlap,background,fixed"/> <hbox name="PlayModeUI::heading_panel" export="1" pos_x="255" pos_y="22" background="1"> <!-- if align="overlap" content isn't shown--> <sprite name="PlayModeUI::s80_top_mini" export="1" texture="navantia3d/gui/play_s80_top_mini.png" align="left"/> <label name="PlayModeUI::heading_value" export="1" align="center"> <text face="ae3d/fonts/tungab.ttf" size="14">-000</text> </label> <label name="PlayModeUI::heading_units" export="1" align="right"> <text face="ae3d/fonts/tungab.ttf" size="12">º</text> </label> </hbox> </vbox> </ui> and the the code to load it: /* */ void init(){ // Get the default GUI used by the engine. Gui gui = engine.getGui(); // Load all widgets from user interface file. ui = engine.gui.addUserInterface(gui,"navantia3d/gui/play.ui"); // Add the menu window to be rendered in the default GUI. Only root widgets // should be added (their children will automatically become visible). gui.addChild(panel,GUI_ALIGN_TOP | GUI_ALIGN_LEFT | GUI_ALIGN_OVERLAP); panel.arrange(); } If align="overlap" attribute is set to PlayModeUI::heading_panel:the result is: If I remove the attribute, thae panl shows its content (but in the wrong place obviously) Using UnigineScript I get the same result. Best regards, Iván.