diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-17 13:58:32 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-17 13:58:32 -0400 |
commit | e882367d80a0bcdd09b5412d908b0fdb6b6bfe34 (patch) | |
tree | e5a023fc51f02cf37b97bfbb9ef09d2ddfc6591e /tools/mapedit/src/map.h | |
parent | 29f818c314f86f9a842840c20d9634f0711507a6 (diff) | |
download | therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.tar.gz therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.tar.bz2 therapy-e882367d80a0bcdd09b5412d908b0fdb6b6bfe34.zip |
Implemented undo/redo framework in map editor
Diffstat (limited to 'tools/mapedit/src/map.h')
-rw-r--r-- | tools/mapedit/src/map.h | 9 |
1 files changed, 6 insertions, 3 deletions
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 | |||
53 | 53 | ||
54 | struct MapObjectEntry { | 54 | struct MapObjectEntry { |
55 | MapObject* object; | 55 | MapObject* object; |
56 | std::pair<double, double> position; | 56 | std::pair<int, int> position; |
57 | 57 | ||
58 | bool operator==(MapObjectEntry& other) const | 58 | bool operator==(MapObjectEntry& other) const |
59 | { | 59 | { |
@@ -85,17 +85,19 @@ class Map { | |||
85 | std::list<std::shared_ptr<Map>> getChildren() const; | 85 | std::list<std::shared_ptr<Map>> getChildren() const; |
86 | bool getExpanded() const; | 86 | bool getExpanded() const; |
87 | World* getWorld() const; | 87 | World* getWorld() const; |
88 | bool getHidden() const; | ||
88 | 89 | ||
89 | void setTitle(std::string title, bool dirty = true); | 90 | void setTitle(std::string title, bool dirty = true); |
90 | void setTileAt(int x, int y, int tile, bool dirty = true); | 91 | void setTileAt(int x, int y, int tile, bool dirty = true); |
91 | void setMapdata(int* mapdata, bool dirty = true); | 92 | void setMapdata(int* mapdata, bool dirty = true); |
92 | void addObject(std::shared_ptr<MapObjectEntry>& obj, bool dirty = true); | 93 | void addObject(std::shared_ptr<MapObjectEntry> obj, bool dirty = true); |
93 | void removeObject(std::shared_ptr<MapObjectEntry>& obj, bool dirty = true); | 94 | void removeObject(std::shared_ptr<MapObjectEntry> obj, bool dirty = true); |
94 | void setLeftmap(int id, bool dirty = true); | 95 | void setLeftmap(int id, bool dirty = true); |
95 | void setRightmap(int id, bool dirty = true); | 96 | void setRightmap(int id, bool dirty = true); |
96 | void setTreeItemId(wxTreeItemId id); | 97 | void setTreeItemId(wxTreeItemId id); |
97 | void addChild(int id); | 98 | void addChild(int id); |
98 | void setExpanded(bool exp); | 99 | void setExpanded(bool exp); |
100 | void setHidden(bool hid); | ||
99 | 101 | ||
100 | private: | 102 | private: |
101 | int id; | 103 | int id; |
@@ -108,6 +110,7 @@ class Map { | |||
108 | int rightmap = -1; | 110 | int rightmap = -1; |
109 | wxTreeItemId treeItemId; | 111 | wxTreeItemId treeItemId; |
110 | bool expanded = false; | 112 | bool expanded = false; |
113 | bool hidden = false; | ||
111 | }; | 114 | }; |
112 | 115 | ||
113 | #endif | 116 | #endif |