Added raylib-cpp header files to my project

This commit is contained in:
2024-01-31 21:01:35 -05:00
parent c83b347620
commit e6f328ea1d
38 changed files with 7356 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
#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_