From 0d30e9b57229905f78e7bd60fe5d3cde72851f28 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Mar 2015 16:53:05 -0400 Subject: Rewrote map editor so a single file contains all maps Maps are viewed in a tree control on the left. They can be dragged and dropped. Maps are bolded when they are dirty. Saving saves expansion status and order of maps in tree. --- tools/mapedit/src/world.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tools/mapedit/src/world.h (limited to 'tools/mapedit/src/world.h') diff --git a/tools/mapedit/src/world.h b/tools/mapedit/src/world.h new file mode 100644 index 0000000..7d796cc --- /dev/null +++ b/tools/mapedit/src/world.h @@ -0,0 +1,45 @@ +#ifndef WORLD_H +#define WORLD_H + +class World; + +#include + +#ifndef WX_PRECOMP +#include +#endif + +#include +#include +#include +#include "map.h" +#include + +class MapeditFrame; + +class World { + public: + World(); + World(std::string filename); + std::shared_ptr newMap(); + std::shared_ptr getMap(int id) const; + void setDirty(bool dirty); + bool getDirty() const; + std::string getFilename() const; + void setParent(MapeditFrame* parent); + void save(std::string filename, wxTreeCtrl* mapTree); + Map* getLastMap() const; + std::list> getRootMaps() const; + const std::map> getMaps() const; + + private: + MapeditFrame* parent; + std::map> maps; + int nextMapID = 0; + bool dirty = false; + std::string filename; + int lastmap = 0; + std::list rootChildren; +}; + +#endif -- cgit 1.4.1