Roguelike
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
cursor.h
Go to the documentation of this file.
1 #ifndef ROGUELIKE_UI_CURSOR_H_
2 #define ROGUELIKE_UI_CURSOR_H_
3 
4 // Inheritance
5 // (none)
6 
7 // External Dependencies
8 #include <ugdk/math/integer2D.h> // tile_
9 
10 // Internal Dependencies
11 // (none)
12 
13 // Forward Declarations
14 #include <ugdk/graphic.h>
15 #include "game/base.h"
16 
17 namespace game {
18 namespace ui {
19 
20 class Cursor {
21  public:
22  Cursor();
23  ~Cursor() {}
24 
25  ugdk::math::Integer2D tile() const { return tile_; }
26  void ChangeTile(const ugdk::math::Integer2D& tile);
27  void ChangeTile(int x, int y) { ChangeTile(ugdk::math::Integer2D(x,y)); }
28 
29  bool IsActive();
30  void ToggleActive();
31 
32  protected:
33  ugdk::math::Integer2D tile_;
34  ugdk::graphic::Modifier* node_modifier_;
35 };
36 
37 } // namespace ui
38 } // namespace game
39 
40 #endif // ROGUELIKE_UI_CURSOR_H_
ugdk::math::Integer2D tile_
Definition: cursor.h:33
Cursor()
Definition: cursor.cc:26
ugdk::graphic::Modifier * node_modifier_
Definition: cursor.h:34
~Cursor()
Definition: cursor.h:23
Definition: aim.cc:15
bool IsActive()
Definition: cursor.cc:46
void ChangeTile(const ugdk::math::Integer2D &tile)
Definition: cursor.cc:38
ugdk::math::Integer2D tile() const
Definition: cursor.h:25
void ToggleActive()
Definition: cursor.cc:50
void ChangeTile(int x, int y)
Definition: cursor.h:27
Definition: cursor.h:20