lars.saalbach Posted December 17, 2011 Share Posted December 17, 2011 Hello Community, i have a little problem, the most is said in the topic-title, but here a little longer explanations: First i want to load a defined gui: engine.gui.addUserInterface ( engine.getGui(), "myGui.ui" ); After this, i do: Gui gui = engine.getGui(); Now my gui is visible. And now my problems begins: I have a Button called "Add a Tab", with this i want to change the myGui.ui, and add a new Tab dynamic to the .ui, of course i want to remove a tab again too, this needs to be dynamlicy, so i could add more then one tab, and remove more then one tab. The second thing is, when i added a dynamic tab, i want to input some buttons into the tab too. (Maybe this both things needs to be added together, i dont know?) I've searched the API and https://developer.unigine.com/docs but i didnt find anything. Is there any point to help me? Maybe someone have a example to me, how to do this? Greetings Link to comment
ulf.schroeter Posted December 17, 2011 Share Posted December 17, 2011 What about WidgetTabBox ? There are some methods for adding and removing tabs. Link to comment
lars.saalbach Posted December 18, 2011 Author Share Posted December 18, 2011 Hey Ulf, thanks for this fast reply! Yä, this works, to insert a new tab, thanks thanks thanks! But problem 2 is not solved with the add or remove tab solution, because i need now to get content in my added tab too, with mainTabBox.addchild etc. my application crash's. Is there a way to load a UserInterface into the created tab, like "addUserInterface()" or how could this be managed? Not just text should be shown in the created tab: buttons, checkboxes etc. too, which should have callback's too, and can be mananaged in code? Thanks a lot for any help! Link to comment
ulf.schroeter Posted December 18, 2011 Share Posted December 18, 2011 Have a look into data/core/editor sub-directory for samples of WidgetTabBox usage (search for files *.h containing WidgetTabBox via Windows Explorer or similar search tool). There should be some examples how to dynamically define callbacks, child elements etc. Link to comment
lars.saalbach Posted December 18, 2011 Author Share Posted December 18, 2011 Thanks Ulf, editor_creator.h seems like to have this function's i'm searching for... testing atm. Greetings Link to comment
Recommended Posts