new widgets
This commit is contained in:
parent
5cc982fa00
commit
285ca80b4b
18 changed files with 373 additions and 43 deletions
|
|
@ -70,6 +70,9 @@ namespace tp {
|
|||
void processEvent();
|
||||
|
||||
[[nodiscard]] const Vec2F& getPointer() const;
|
||||
[[nodiscard]] const Vec2F& getPointerPrev() const;
|
||||
[[nodiscard]] Vec2F getPointerDelta() const;
|
||||
|
||||
[[nodiscard]] bool isPressed(InputID id) const;
|
||||
[[nodiscard]] bool isReleased(InputID id) const;
|
||||
[[nodiscard]] bool isDown(InputID id) const;
|
||||
|
|
@ -85,6 +88,8 @@ namespace tp {
|
|||
|
||||
// input states
|
||||
Vec2F mPointer;
|
||||
Vec2F mPointerPrev;
|
||||
|
||||
halnf mPointerPressure = 0;
|
||||
|
||||
InputState mInputStates[(int) InputID::LAST_KEY_CODE]{};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace tp {
|
|||
~Window();
|
||||
|
||||
public:
|
||||
static Window* createWindow(Vec2F size = { 1000.f, 900.f }, const char* title = "Window");
|
||||
static Window* createWindow(Vec2F size = { 500.f, 500.f }, const char* title = "Window");
|
||||
static void destroyWindow(Window* window);
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue