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