raylib-cpp
C++ object-oriented wrapper library for raylib.
Touch.hpp
1 #ifndef RAYLIB_CPP_INCLUDE_TOUCH_HPP_
2 #define RAYLIB_CPP_INCLUDE_TOUCH_HPP_
3 
4 #include "./raylib.hpp"
5 
6 namespace raylib {
10 class Touch {
11  public:
15  inline static int GetX() {
16  return ::GetTouchX();
17  }
18 
22  inline static int GetY() {
23  return ::GetTouchY();
24  }
25 
29  inline static Vector2 GetPosition(int index) {
30  return ::GetTouchPosition(index);
31  }
32 
36  inline static int GetPointId(int index) {
37  return ::GetTouchPointId(index);
38  }
39 
43  inline static int GetPointCount() {
44  return ::GetTouchPointCount();
45  }
46 };
47 } // namespace raylib
48 
49 using RTouch = raylib::Touch;
50 
51 #endif // RAYLIB_CPP_INCLUDE_TOUCH_HPP_
Input-related functions: touch.
Definition: Touch.hpp:10
static Vector2 GetPosition(int index)
Get touch position XY for a touch point index (relative to screen size)
Definition: Touch.hpp:29
static int GetPointCount()
Get number of touch points.
Definition: Touch.hpp:43
static int GetPointId(int index)
Get touch point identifier for given index.
Definition: Touch.hpp:36
static int GetY()
Get touch position Y for touch point 0 (relative to screen size)
Definition: Touch.hpp:22
static int GetX()
Get touch position X for touch point 0 (relative to screen size)
Definition: Touch.hpp:15
Vector2 type.
Definition: Vector2.hpp:16
All raylib-cpp classes and functions appear in the raylib namespace.
Definition: AudioDevice.hpp:8