From 45054b224d8f0f8b6d7db4bcd0b0abf6763a60ab Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 31 Jul 2011 18:24:01 +0000 Subject: Improved map window, moved the actual map widget into a seperate class. --- src/client/mapwidget.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/client/mapwidget.h (limited to 'src/client/mapwidget.h') 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__ -- cgit v1.2.3