You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB
C++

#ifndef RAYLIB_CPP_INCLUDE_TOUCH_HPP_
#define RAYLIB_CPP_INCLUDE_TOUCH_HPP_
#include "./raylib.hpp"
namespace raylib {
/**
* Input-related functions: touch
*/
class Touch {
public:
/**
* Get touch position X for touch point 0 (relative to screen size)
*/
inline static int GetX() {
return ::GetTouchX();
}
/**
* Get touch position Y for touch point 0 (relative to screen size)
*/
inline static int GetY() {
return ::GetTouchY();
}
/**
* Get touch position XY for a touch point index (relative to screen size)
*/
inline static Vector2 GetPosition(int index) {
return ::GetTouchPosition(index);
}
/**
* Get touch point identifier for given index
*/
inline static int GetPointId(int index) {
return ::GetTouchPointId(index);
}
/**
* Get number of touch points
*/
inline static int GetPointCount() {
return ::GetTouchPointCount();
}
};
} // namespace raylib
using RTouch = raylib::Touch;
#endif // RAYLIB_CPP_INCLUDE_TOUCH_HPP_