Oxygine  1
2g game engine
PointerState.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "math/Vector2.h"
4 #include <list>
5 
6 namespace oxygine
7 {
8  enum MouseButton
9  {
10  MouseButton_Touch = 0,
11  MouseButton_Left = 0,
12  MouseButton_Middle = 1,
13  MouseButton_Right = 2,
14  MouseButton_Num = 3
15 
16  };
17 
19  {
20  public:
21  PointerState();
22 
23  void init(pointer_index pointerIndex);
24 
25  bool isPressed(MouseButton mb = MouseButton_Touch) const;
26  pointer_index getIndex() const {return _index;}
27  const Vector2& getPosition() const {return _position;}
28 
29  private:
30  friend class Input;
31 
32  Vector2 _position;
33  int _pressed;
34  pointer_index _index;
35  };
36 }
Definition: Input.h:11
–oxgl-end–!
Definition: Actor.h:14
Definition: PointerState.h:18