dmitriy.ogorodnikov Posted October 2, 2014 Posted October 2, 2014 Hello ! The Nodes window contains all objects in the world and tabs with properties of these objects. For example, Sun has 3 tabs: Node, Light, Shadow. I would like to add different custom tabs to my objects, thus every custom object could have custom settings. I would like to change these settings in Editor. How can I do this ? Thank you.
azagniy Posted October 2, 2014 Posted October 2, 2014 Hi, You can manage Nodes tabs via custom editor plugin.You can add custom tab to Nodes tabbox by using ::Nodes::parameters_tb.addTab(string tab name) function. To add your widget as child of your tab use a ::Nodes::parameters_tb.addChild(Widget widget,int flags) function after. Please, check our implementation in Game Framework plugin: framework/plugin/editor/framework_editor.h at nodeInit() function: // remove "entity" tab, if node reference is already Entity for(int i = 0; i < ::Nodes::parameters_tb.getNumTabs(); i++) { if(::Nodes::parameters_tb.getTabText(i) == "Entity Fields") { ::Nodes::parameters_tb.removeTab(i); i--; } } ::Nodes::parameters_tb.addTab("Entity Fields"); ::Nodes::parameters_tb.addChild(vbox.widget,GUI_ALIGN_EXPAND); Thanks!
Recommended Posts