summaryrefslogtreecommitdiffstats
path: root/src/View/TopView.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/View/TopView.h')
-rw-r--r--src/View/TopView.h10
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);
};
}