From 9626a5ce823fe94970b04dc504993583996e6074 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 6 Jan 2015 21:38:33 +0000 Subject: Fixed target selection in the map window. --- src/client/galaxymapwidget.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/client/galaxymapwidget.h') diff --git a/src/client/galaxymapwidget.h b/src/client/galaxymapwidget.h index 3e74903..a3cc01d 100644 --- a/src/client/galaxymapwidget.h +++ b/src/client/galaxymapwidget.h @@ -10,7 +10,8 @@ #include "core/zone.h" #include "ui/widget.h" -namespace client { +namespace client +{ class GalaxyMapWidget : public ui::Widget { @@ -23,19 +24,26 @@ public: void set_zone(core::Zone *zone); - inline unsigned int hover() const { + inline unsigned int hover() const + { return galaxymapwidget_hover_id; } - inline core::Zone *zone() const { + inline core::Zone *zone() const + { return galaxymapwidget_zone; } protected: + /** + * @brief draw event handler + * */ virtual void draw(); - /// called when the widget receives a key press - virtual bool on_keypress(const int key, const unsigned int modifier); + /** + * @brief mouse button press event handler + * */ + virtual bool on_mousepress(const unsigned int button); private: float galaxymapwidget_zoom; @@ -46,4 +54,5 @@ private: }; // class GalaxyMapWidget } // namespace client + #endif // __INCLUDED_CLIENT_GALAXYMAPWIDGET_H__ -- cgit v1.2.3