Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-07-31 18:24:01 +0000
committerStijn Buys <ingar@osirion.org>2011-07-31 18:24:01 +0000
commit45054b224d8f0f8b6d7db4bcd0b0abf6763a60ab (patch)
treec23ea79d4564037673312ea1d4cb936272c65a06 /src/client/mapwidget.h
parentf0cbe1d0655013d14dd4f1807ddb88789ae8d27a (diff)
Improved map window, moved the actual map widget into a seperate class.
Diffstat (limited to 'src/client/mapwidget.h')
-rw-r--r--src/client/mapwidget.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/client/mapwidget.h b/src/client/mapwidget.h
new file mode 100644
index 0000000..fb5a905
--- /dev/null
+++ b/src/client/mapwidget.h
@@ -0,0 +1,43 @@
+/*
+ client/mapwidget.h
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_CLIENT_MAPWIDGET_H__
+#define __INCLUDED_CLIENT_MAPWIDGET_H__
+
+#include "core/zone.h"
+#include "ui/widget.h"
+
+namespace client {
+
+class MapWidget : public ui::Widget {
+public:
+ MapWidget(ui::Widget *parent = 0);
+ virtual ~MapWidget();
+
+ void set_zoom(const float zoom);
+
+ void set_zone(core::Zone *zone);
+
+ void set_target(const core::Entity *entity);
+
+ inline unsigned int hover() {
+ return mapwidget_hover_id;
+ }
+
+protected:
+ virtual void draw();
+
+private:
+ float mapwidget_zoom;
+
+ core::Zone *mapwidget_zone;
+ const core::Entity *mapwidget_target;
+ unsigned int mapwidget_hover_id;
+
+}; // class MapWidget
+
+} // namespace client
+#endif // __INCLUDED_CLIENT_MAPWIDGET_H__