|
Plutonium framework API 1.0.0
Easy-to-use, SDL2-based UI framework for Nintendo Switch homebrew
|
Type encoding a touch point. More...
#include <ui_Types.hpp>
Public Member Functions | |
| constexpr | TouchPoint () |
| Creates a new, invalid TouchPoint (with both coordinates set to -1). | |
| constexpr | TouchPoint (const u32 x, const u32 y) |
| Creates a new TouchPoint with the specified coordinates. | |
| constexpr bool | IsEmpty () const |
| Checks whether this TouchPoint is not valid (both coordinates are less than 0). | |
| constexpr bool | HitsRegion (const i32 region_x, const i32 region_y, const i32 region_w, const i32 region_h) const |
| Checks whether this TouchPoint hits a rectangle region. | |
Public Attributes | |
| i32 | x |
| i32 | y |
Type encoding a touch point.
|
inlineconstexpr |
Creates a new, invalid TouchPoint (with both coordinates set to -1).
|
inlineconstexpr |
Creates a new TouchPoint with the specified coordinates.
| x | X coordinate. |
| y | Y coordinate. |
|
inlineconstexpr |
Checks whether this TouchPoint hits a rectangle region.
| region_x | X coordinate of the region. |
| region_y | Y coordinate of the region. |
| region_w | Width of the region. |
| region_h | Height of the region. |
|
inlineconstexpr |
Checks whether this TouchPoint is not valid (both coordinates are less than 0).
| i32 pu::ui::TouchPoint::x |
| i32 pu::ui::TouchPoint::y |