diff options
author | neoraider <devnull@localhost> | 2008-05-20 11:55:04 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-05-20 11:55:04 +0200 |
commit | 5bb27d2b6d7915f03fd7e39444a2ff0fac537672 (patch) | |
tree | 16504dbcadf71afd3be79977d3eda2e0a562ed79 /src/View/TopView.h | |
parent | 094c72221ea15615b4bcdc31a4acbb4e5c67817a (diff) | |
download | zoomedit-5bb27d2b6d7915f03fd7e39444a2ff0fac537672.tar zoomedit-5bb27d2b6d7915f03fd7e39444a2ff0fac537672.zip |
zoomedit:
* Added 2D vector maths
* Made rooms selectable
Diffstat (limited to 'src/View/TopView.h')
-rw-r--r-- | src/View/TopView.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/View/TopView.h b/src/View/TopView.h index abbb77b..17a324d 100644 --- a/src/View/TopView.h +++ b/src/View/TopView.h @@ -52,10 +52,13 @@ class TopView : public View { int zoomLevel; float scale; + Data::Room *selectedRoom; + void drawGrid(); public: - TopView(Data::Level *level0 = 0) : level(level0), viewWidth(0), viewHeight(0), xCenter(0), yCenter(0), zoomLevel(0), scale(100) {} + TopView(Data::Level *level0 = 0) + : level(level0), viewWidth(0), viewHeight(0), xCenter(0), yCenter(0), zoomLevel(0), scale(100), selectedRoom(0) {} float getWidth() const {return viewWidth;} float getHeight() const {return viewHeight;} @@ -67,6 +70,8 @@ class TopView : public View { float getScale() const {return scale;} + Data::Room* getSelectedRoom() {return selectedRoom;} + Data::Level* getLevel() {return level;} void setLevel(Data::Level *level0) {level = level0; signalUpdate().emit();} @@ -77,8 +82,9 @@ class TopView : public View { virtual void zoom(int zoom, float x, float y); virtual void move(float x, float y, unsigned int state); + virtual void click(float x, float y, unsigned int button); - static void renderRoom(Data::Room *room); + static void renderRoom(Data::Room *room, bool selected = false); }; } |