From 60b0e02ab6b8910b3870d16a6eef9d67c6a6f34e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 7 Oct 2012 21:46:02 +0000 Subject: Add galactic map, make it possible to other zones on the map. --- src/client/mapwidget.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/client/mapwidget.h') diff --git a/src/client/mapwidget.h b/src/client/mapwidget.h index fb5a905..0482330 100644 --- a/src/client/mapwidget.h +++ b/src/client/mapwidget.h @@ -12,9 +12,11 @@ namespace client { -class MapWidget : public ui::Widget { +class MapWidget : public ui::Widget +{ public: MapWidget(ui::Widget *parent = 0); + virtual ~MapWidget(); void set_zoom(const float zoom); @@ -23,13 +25,24 @@ public: void set_target(const core::Entity *entity); - inline unsigned int hover() { + inline unsigned int hover() const { return mapwidget_hover_id; } + + inline const core::Entity *target() const { + return mapwidget_target; + } + + inline core::Zone *zone() const { + return mapwidget_zone; + } protected: virtual void draw(); + /// called when the widget receives a key press + virtual bool on_keypress(const int key, const unsigned int modifier); + private: float mapwidget_zoom; -- cgit v1.2.3