From 213cab3c04b81428ab715f340bd7c12438fdb980 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Mar 2015 23:24:22 -0400 Subject: Map editor can now add entities to maps Also fixed a big bug regarding scrolling --- tools/mapedit/src/frame.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/mapedit/src/frame.h') diff --git a/tools/mapedit/src/frame.h b/tools/mapedit/src/frame.h index 5e119f3..cb29480 100644 --- a/tools/mapedit/src/frame.h +++ b/tools/mapedit/src/frame.h @@ -11,6 +11,7 @@ #include "widget.h" #include "tile_widget.h" #include +#include class MapeditFrame : public wxFrame { public: @@ -18,6 +19,7 @@ class MapeditFrame : public wxFrame { MapeditFrame(Map map, std::string filename); MapeditWidget* GetMapEditor(); + void FinishAddingEntity(); static void NewMap(); static void OpenMap(const char* filename); @@ -36,12 +38,22 @@ class MapeditFrame : public wxFrame { void OnExit(wxCloseEvent& event); void OnQuit(wxCommandEvent& event); void OnTitleChange(wxCommandEvent& event); + void OnTabChange(wxBookCtrlEvent& event); + void OnTabChanging(wxBookCtrlEvent& event); + void OnAddEntity(wxCommandEvent& event); + void OnCancelAddEntity(wxCommandEvent& event); Map map; MapeditWidget* mapEditor; TileWidget* tileEditor; wxTextCtrl* titleBox; std::string filename; + wxNotebook* notebook; + wxChoice* entityTypeBox; + wxButton* addEntityButton; + wxButton* cancelEntityButton; + + bool addingEntity = false; wxDECLARE_EVENT_TABLE(); }; -- cgit 1.4.1