Oxygine  1
2g game engine
Input.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "EventDispatcher.h"
4 #include "closure/closure.h"
5 #include "PointerState.h"
6 
7 namespace oxygine
8 {
9  const int MAX_TOUCHES = 17;
10 
11  class Input
12  {
13  public:
14  static Input instance;
15 
16  Input();
17  ~Input();
18 
19  void cleanup();
20 
21  void multiTouchEnabled(bool en);
22 
24  PointerState* getTouchByIndex(pointer_index index);
25 
26 #ifndef __S3E__
27  int touchID2index(int64 id);
28  PointerState* getTouchByID(int64 id);
29 #endif
30 
31 
32  //internal:
33  PointerState _pointers[MAX_TOUCHES];
34  PointerState _pointerMouse;
35 
36  int64 _ids[MAX_TOUCHES + 1];
37 
38 
39  void sendPointerButtonEvent(spStage, MouseButton button, float x, float y, float pressure, int type, PointerState*);
40  void sendPointerMotionEvent(spStage, float x, float y, float pressure, PointerState*);
41  void sendPointerWheelEvent(spStage, const Vector2& dir, PointerState*);
42 
43  bool _multiTouch;
44  };
45 }
Definition: Input.h:11
–oxgl-end–!
Definition: Actor.h:14
Definition: PointerState.h:18
PointerState * getTouchByIndex(pointer_index index)