From 281bdf956a646fd8c9944e9a44f867c984792216 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 19 Mar 2015 11:42:54 -0400 Subject: Map editor can now edit properties for objects (breaks main game build) --- tools/mapedit/src/undo.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'tools/mapedit/src/undo.h') diff --git a/tools/mapedit/src/undo.h b/tools/mapedit/src/undo.h index 794f993..621f42c 100644 --- a/tools/mapedit/src/undo.h +++ b/tools/mapedit/src/undo.h @@ -32,7 +32,7 @@ class Undoable { class UndoableTextBox : public wxTextCtrl { public: UndoableTextBox(); - UndoableTextBox(wxWindow* parent, wxWindowID id, wxString startText, std::string undoType, MapeditFrame* realParent, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = 0); + UndoableTextBox(wxWindow* parent, wxWindowID id, wxString startText, std::string undoType, MapeditFrame* realParent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); private: class Undo : public Undoable { @@ -60,4 +60,32 @@ class UndoableTextBox : public wxTextCtrl { wxDECLARE_EVENT_TABLE(); }; +class UndoableChoice : public wxChoice { + public: + UndoableChoice(); + UndoableChoice(wxWindow* parent, wxWindowID id, MapeditFrame* realParent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); + + protected: + void Init(); + void OnChoose(wxCommandEvent& event); + + private: + MapeditFrame* realParent; +}; + +class UndoableSlider : public wxSlider { + public: + UndoableSlider(); + UndoableSlider(wxWindow* parent, wxWindowID id, MapeditFrame* realParent, int value, int minvalue, int maxvalue, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxSliderNameStr); + + protected: + void Init(); + void OnSlide(wxScrollEvent& event); + + private: + MapeditFrame* realParent; + + wxDECLARE_EVENT_TABLE(); +}; + #endif -- cgit 1.4.1