DynamicEditor::DynamicEditor(FreeCamera* camera, EditorMode* _mode) :editorModes ({ {{"position","dimensions"}, new DynamicEditor::DerivedModeFactory<BoxDragMode>()}, {{"points"}, new DynamicEditor::DerivedModeFactory<PointGeometryMode>()}, {{"position", "radius"}, new DynamicEditor::DerivedModeFactory<CircleDragMode>()}, {{"position"}, new DynamicEditor::DerivedModeFactory<ClickPlaceMode>()}, }), editorVariables ({ {"skin", new ComponentObjectSelectionVariableFactory<Skin>("skin","StaticSkinFactory")}, }), params(nullptr) { //ctor //entityList = new EntityList("Root/EntityList/Listbox"); camera->activate(); mCamera = camera; instanceTab = getTabControl("Root/Entities"); typeTab = getTabControl("Root/EntityTypes"); entityName = CEGUI::System::getSingleton().getGUISheet()->getChildRecursive("Root/Entities/EntityName"); //nameVariableController = new NameVariableController(entityName, ¶ms); nameVariableControllerFactory = new NameVariableControllerFactory("ThisIsAName", entityName); assert(entityName); instanceTab->getParent()->setEnabled(false); typeTab->getParent()->setEnabled(false); instanceTab->getParent()->setVisible(false); typeTab->getParent()->setVisible(false); CEGUI::Window* button = typeTab->getParent()->getChild("Root/EntityTypes/CreateButton"); button->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::SubscriberSlot(&DynamicEditor::createFactory,this)); editorMode = _mode; }
PropertiesWindow::PropertiesWindow(PropertyHolder* object) : AbstractWindow("propertieswindow.xml", WIT_MOUSE_INPUT), mObject(object) { // Get access to the tab control mTabPane = getTabControl("PropertiesWindow/PropertiesTabPane"); RlAssert(mTabPane != NULL, "PropertiesWindow/PropertiesTabPane is null"); // Get a access to the main Property table mMainTable = getMultiColumnList("PropertiesWindow/PropertiesTabControl/MainTable"); RlAssert(mMainTable != NULL, "PropertiesWindow/PropertiesTabPane is null"); mMainTable->addColumn( (utf8*)"Key", 0, cegui_reldim(0.3)); mMainTable->addColumn( (utf8*)"Type", 1, cegui_reldim(0.3)); mMainTable->addColumn( (utf8*)"Value", 2, cegui_reldim(0.4)); centerWindow(); bindDestroyWindowToXButton(); bindDestroyWindowToClick(getWindow("PropertiesWindow/CloseButton")); initialize(mObject); }