示例#1
0
/* LinePropsPanel::LinePropsPanel
 * LinePropsPanel class constructor
 *******************************************************************/
LinePropsPanel::LinePropsPanel(wxWindow* parent) : PropsPanelBase(parent)
{
	wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(sizer);

	// Tabs
	stc_tabs = new STabCtrl(this, false);
	sizer->Add(stc_tabs, 1, wxEXPAND);

	// General tab
	stc_tabs->AddPage(setupGeneralTab(), "General");

	// Special tab
	stc_tabs->AddPage(setupSpecialTab(), "Special");

	// Args tab
	if (theMapEditor->currentMapDesc().format != MAP_DOOM)
	{
		panel_args = new ArgsPanel(stc_tabs);
		stc_tabs->AddPage(panel_args, "Args");
		panel_special->setArgsPanel(panel_args);
	}

	// Front side tab
	panel_side1 = new SidePropsPanel(stc_tabs);
	stc_tabs->AddPage(panel_side1, "Front Side");

	// Back side tab
	panel_side2 = new SidePropsPanel(stc_tabs);
	stc_tabs->AddPage(panel_side2, "Back Side");

	// All properties tab
	mopp_all_props = new MapObjectPropsPanel(stc_tabs, true);
	mopp_all_props->hideFlags(true);
	mopp_all_props->hideTriggers(true);
	mopp_all_props->hideProperty("special");
	mopp_all_props->hideProperty("arg0");
	mopp_all_props->hideProperty("arg1");
	mopp_all_props->hideProperty("arg2");
	mopp_all_props->hideProperty("arg3");
	mopp_all_props->hideProperty("arg4");
	mopp_all_props->hideProperty("texturetop");
	mopp_all_props->hideProperty("texturemiddle");
	mopp_all_props->hideProperty("texturebottom");
	mopp_all_props->hideProperty("offsetx");
	mopp_all_props->hideProperty("offsety");
	mopp_all_props->hideProperty("id");
	stc_tabs->AddPage(mopp_all_props, "Other Properties");

	// Bind events
	cb_override_special->Bind(wxEVT_CHECKBOX, &LinePropsPanel::onOverrideSpecialChecked, this);
}
示例#2
0
// ----------------------------------------------------------------------------
// ThingPropsPanel::ThingPropsPanel
//
// ThingPropsPanel class constructor
// ----------------------------------------------------------------------------
ThingPropsPanel::ThingPropsPanel(wxWindow* parent) : PropsPanelBase(parent)
{
	// Setup sizer
	wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(sizer);

	// Tabs
	stc_tabs_ = STabCtrl::createControl(this);
	sizer->Add(stc_tabs_, 1, wxEXPAND|wxALL, UI::pad());

	// General tab
	stc_tabs_->AddPage(setupGeneralTab(), "General");

	// Extra Flags tab
	if (!udmf_flags_extra_.empty())
		stc_tabs_->AddPage(setupExtraFlagsTab(), "Extra Flags");

	// Special tab
	if (MapEditor::editContext().mapDesc().format != MAP_DOOM)
	{
		panel_special_ = new ActionSpecialPanel(this, false);
		stc_tabs_->AddPage(WxUtils::createPadPanel(stc_tabs_, panel_special_), "Special");
	}

	// Args tab
	if (MapEditor::editContext().mapDesc().format != MAP_DOOM)
	{
		panel_args_ = new ArgsPanel(this);
		stc_tabs_->AddPage(WxUtils::createPadPanel(stc_tabs_, panel_args_), "Args");
		if (panel_special_)
			panel_special_->setArgsPanel(panel_args_);
	}

	// Other Properties tab
	stc_tabs_->AddPage(mopp_other_props_ = new MapObjectPropsPanel(stc_tabs_, true), "Other Properties");
	mopp_other_props_->hideFlags(true);
	mopp_other_props_->hideProperty("height");
	mopp_other_props_->hideProperty("angle");
	mopp_other_props_->hideProperty("type");
	mopp_other_props_->hideProperty("id");
	mopp_other_props_->hideProperty("special");
	mopp_other_props_->hideProperty("arg0");
	mopp_other_props_->hideProperty("arg1");
	mopp_other_props_->hideProperty("arg2");
	mopp_other_props_->hideProperty("arg3");
	mopp_other_props_->hideProperty("arg4");

	// Bind events
	gfx_sprite_->Bind(wxEVT_LEFT_DOWN, &ThingPropsPanel::onSpriteClicked, this);

	Layout();
}
示例#3
0
/* ThingPropsPanel::ThingPropsPanel
 * ThingPropsPanel class constructor
 *******************************************************************/
ThingPropsPanel::ThingPropsPanel(wxWindow* parent) : PropsPanelBase(parent)
{
	panel_special = NULL;
	panel_args = NULL;

	// Setup sizer
	wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(sizer);

	// Tabs
	stc_tabs = new STabCtrl(this, false);
	sizer->Add(stc_tabs, 1, wxEXPAND|wxALL, 4);

	// General tab
	stc_tabs->AddPage(setupGeneralTab(), "General");

	// Extra Flags tab
	if (!udmf_flags_extra.empty())
		stc_tabs->AddPage(setupExtraFlagsTab(), "Extra Flags");

	// Special tab
	if (theMapEditor->currentMapDesc().format != MAP_DOOM)
		stc_tabs->AddPage(panel_special = new ActionSpecialPanel(stc_tabs, false), "Special");

	// Args tab
	if (theMapEditor->currentMapDesc().format != MAP_DOOM)
	{
		stc_tabs->AddPage(panel_args = new ArgsPanel(stc_tabs), "Args");
		if (panel_special)
			panel_special->setArgsPanel(panel_args);
	}

	// Other Properties tab
	stc_tabs->AddPage(mopp_other_props = new MapObjectPropsPanel(stc_tabs, true), "Other Properties");
	mopp_other_props->hideFlags(true);
	mopp_other_props->hideProperty("height");
	mopp_other_props->hideProperty("angle");
	mopp_other_props->hideProperty("type");
	mopp_other_props->hideProperty("id");
	mopp_other_props->hideProperty("special");
	mopp_other_props->hideProperty("arg0");
	mopp_other_props->hideProperty("arg1");
	mopp_other_props->hideProperty("arg2");
	mopp_other_props->hideProperty("arg3");
	mopp_other_props->hideProperty("arg4");

	// Bind events
	gfx_sprite->Bind(wxEVT_LEFT_DOWN, &ThingPropsPanel::onSpriteClicked, this);

	Layout();
}
// -----------------------------------------------------------------------------
// MapDisplayPrefsPanel class constructor
// -----------------------------------------------------------------------------
MapDisplayPrefsPanel::MapDisplayPrefsPanel(wxWindow* parent) : PrefsPanelBase(parent)
{
	// Create sizer
	auto sizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(sizer);

	// Create notebook
	stc_pages_ = STabCtrl::createControl(this);
	sizer->Add(stc_pages_, 1, wxEXPAND);

	// Setup tabs
	setupGeneralTab();
	setupVerticesTab();
	setupLinesTab();
	setupThingsTab();
	setupFlatsTab();

	wxWindowBase::Layout();
}
示例#5
0
/* MapDisplayPrefsPanel::MapDisplayPrefsPanel
 * MapDisplayPrefsPanel class constructor
 *******************************************************************/
MapDisplayPrefsPanel::MapDisplayPrefsPanel(wxWindow* parent) : PrefsPanelBase(parent)
{
	// Create sizer
	wxBoxSizer* psizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(psizer);

	// Create frame+sizer
	wxStaticBox* frame = new wxStaticBox(this, -1, "Map Editor Display Preferences");
	wxStaticBoxSizer* fsizer = new wxStaticBoxSizer(frame, wxVERTICAL);
	psizer->Add(fsizer, 1, wxEXPAND|wxALL, 4);

	// Create notebook
	nb_pages = new wxNotebook(this, -1);
	fsizer->Add(nb_pages, 1, wxEXPAND|wxALL, 4);

	// Setup tabs
	setupGeneralTab();
	setupVerticesTab();
	setupLinesTab();
	setupThingsTab();
	setupFlatsTab();

	Layout();
}