summaryrefslogtreecommitdiffstats
path: root/src/View/TopView.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-05-20 11:55:04 +0200
committerneoraider <devnull@localhost>2008-05-20 11:55:04 +0200
commit5bb27d2b6d7915f03fd7e39444a2ff0fac537672 (patch)
tree16504dbcadf71afd3be79977d3eda2e0a562ed79 /src/View/TopView.h
parent094c72221ea15615b4bcdc31a4acbb4e5c67817a (diff)
downloadzoomedit-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.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);
};
}