From e882367d80a0bcdd09b5412d908b0fdb6b6bfe34 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 17 Mar 2015 13:58:32 -0400 Subject: Implemented undo/redo framework in map editor --- tools/mapedit/src/map.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/mapedit/src/map.h') diff --git a/tools/mapedit/src/map.h b/tools/mapedit/src/map.h index df3e237..34dcb33 100644 --- a/tools/mapedit/src/map.h +++ b/tools/mapedit/src/map.h @@ -53,7 +53,7 @@ class MapWriteException: public std::exception struct MapObjectEntry { MapObject* object; - std::pair position; + std::pair position; bool operator==(MapObjectEntry& other) const { @@ -85,17 +85,19 @@ class Map { std::list> getChildren() const; bool getExpanded() const; World* getWorld() const; + bool getHidden() const; void setTitle(std::string title, bool dirty = true); void setTileAt(int x, int y, int tile, bool dirty = true); void setMapdata(int* mapdata, bool dirty = true); - void addObject(std::shared_ptr& obj, bool dirty = true); - void removeObject(std::shared_ptr& obj, bool dirty = true); + void addObject(std::shared_ptr obj, bool dirty = true); + void removeObject(std::shared_ptr obj, bool dirty = true); void setLeftmap(int id, bool dirty = true); void setRightmap(int id, bool dirty = true); void setTreeItemId(wxTreeItemId id); void addChild(int id); void setExpanded(bool exp); + void setHidden(bool hid); private: int id; @@ -108,6 +110,7 @@ class Map { int rightmap = -1; wxTreeItemId treeItemId; bool expanded = false; + bool hidden = false; }; #endif -- cgit 1.4.1