/* SectorPropsPanel::SectorPropsPanel * SectorPropsPanel class constructor *******************************************************************/ SectorPropsPanel::SectorPropsPanel(wxWindow* parent) : PropsPanelBase(parent) { // Setup sizer wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); SetSizer(sizer); // Tabs nb_tabs = new wxNotebook(this, -1); sizer->Add(nb_tabs, 1, wxEXPAND); // General tab nb_tabs->AddPage(setupGeneralPanel(), "General"); // Special tab nb_tabs->AddPage(setupSpecialPanel(), "Special"); // Other Properties tab if (theMapEditor->currentMapDesc().format == MAP_UDMF) { mopp_all_props = new MapObjectPropsPanel(nb_tabs, true); mopp_all_props->hideProperty("texturefloor"); mopp_all_props->hideProperty("textureceiling"); mopp_all_props->hideProperty("heightfloor"); mopp_all_props->hideProperty("heightceiling"); mopp_all_props->hideProperty("lightlevel"); mopp_all_props->hideProperty("id"); mopp_all_props->hideProperty("special"); nb_tabs->AddPage(mopp_all_props, "Other Properties"); } else mopp_all_props = NULL; // Bind events btn_new_tag->Bind(wxEVT_BUTTON, &SectorPropsPanel::onBtnNewTag, this); fcb_floor->Bind(wxEVT_TEXT, &SectorPropsPanel::onTextureChanged, this); fcb_ceiling->Bind(wxEVT_TEXT, &SectorPropsPanel::onTextureChanged, this); gfx_floor->Bind(wxEVT_LEFT_DOWN, &SectorPropsPanel::onTextureClicked, this); gfx_ceiling->Bind(wxEVT_LEFT_DOWN, &SectorPropsPanel::onTextureClicked, this); }
// ----------------------------------------------------------------------------- // SectorPropsPanel class constructor // ----------------------------------------------------------------------------- SectorPropsPanel::SectorPropsPanel(wxWindow* parent) : PropsPanelBase(parent) { // Setup sizer auto sizer = new wxBoxSizer(wxVERTICAL); SetSizer(sizer); // Tabs stc_tabs_ = STabCtrl::createControl(this); sizer->Add(stc_tabs_, 1, wxEXPAND); // General tab stc_tabs_->AddPage(setupGeneralPanel(), "General"); // Special tab stc_tabs_->AddPage(setupSpecialPanel(), "Special"); // Other Properties tab if (MapEditor::editContext().mapDesc().format == MapFormat::UDMF) { mopp_all_props_ = new MapObjectPropsPanel(stc_tabs_, true); mopp_all_props_->hideProperty("texturefloor"); mopp_all_props_->hideProperty("textureceiling"); mopp_all_props_->hideProperty("heightfloor"); mopp_all_props_->hideProperty("heightceiling"); mopp_all_props_->hideProperty("lightlevel"); mopp_all_props_->hideProperty("id"); mopp_all_props_->hideProperty("special"); stc_tabs_->AddPage(mopp_all_props_, "Other Properties"); } else mopp_all_props_ = nullptr; // Bind events btn_new_tag_->Bind(wxEVT_BUTTON, &SectorPropsPanel::onBtnNewTag, this); fcb_floor_->Bind(wxEVT_TEXT, &SectorPropsPanel::onTextureChanged, this); fcb_ceiling_->Bind(wxEVT_TEXT, &SectorPropsPanel::onTextureChanged, this); gfx_floor_->Bind(wxEVT_LEFT_DOWN, &SectorPropsPanel::onTextureClicked, this); gfx_ceiling_->Bind(wxEVT_LEFT_DOWN, &SectorPropsPanel::onTextureClicked, this); }
/* ActionSpecialPanel::ActionSpecialPanel * ActionSpecialPanel class constructor *******************************************************************/ ActionSpecialPanel::ActionSpecialPanel(wxWindow* parent, bool trigger) : wxPanel(parent, -1) { panel_args = NULL; choice_trigger = NULL; show_trigger = trigger; // Setup layout wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); SetSizer(sizer); if (theGameConfiguration->isBoom()) { // Action Special radio button wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL); sizer->Add(hbox, 0, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 4); rb_special = new wxRadioButton(this, -1, "Action Special", wxDefaultPosition, wxDefaultSize, wxRB_GROUP); hbox->Add(rb_special, 0, wxEXPAND|wxRIGHT, 8); // Generalised Special radio button rb_generalised = new wxRadioButton(this, -1, "Generalised Special"); hbox->Add(rb_generalised, 0, wxEXPAND); // Boom generalised line special panel panel_gen_specials = new GenLineSpecialPanel(this); panel_gen_specials->Show(false); // Bind events rb_special->Bind(wxEVT_RADIOBUTTON, &ActionSpecialPanel::onRadioButtonChanged, this); rb_generalised->Bind(wxEVT_RADIOBUTTON, &ActionSpecialPanel::onRadioButtonChanged, this); } // Action specials tree setupSpecialPanel(); sizer->Add(panel_action_special, 1, wxEXPAND|wxALL, 4); // Bind events tree_specials->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, &ActionSpecialPanel::onSpecialSelectionChanged, this); }