Fixes and improvements to the graphics module
This commit is contained in:
parent
2fb319840c
commit
e3757770c8
19 changed files with 161 additions and 55 deletions
|
|
@ -71,9 +71,13 @@ namespace tp {
|
|||
public: // User interface
|
||||
bool isEvents();
|
||||
void processEvent();
|
||||
void processAllEvent();
|
||||
|
||||
[[nodiscard]] const Vec2F& getPointer() const;
|
||||
[[nodiscard]] const Vec2F& getPointerPrev() const;
|
||||
|
||||
void setCursorOrigin(const Vec2F& origin);
|
||||
|
||||
[[nodiscard]] Vec2F getPointer() const;
|
||||
[[nodiscard]] Vec2F getPointerPrev() const;
|
||||
[[nodiscard]] Vec2F getPointerDelta() const;
|
||||
|
||||
[[nodiscard]] bool isPressed(InputID id) const;
|
||||
|
|
@ -83,6 +87,9 @@ namespace tp {
|
|||
|
||||
[[nodiscard]] halnf getPointerPressure() const;
|
||||
|
||||
private:
|
||||
void processEventUnguarded();
|
||||
|
||||
private:
|
||||
std::mutex mMutex = {};
|
||||
|
||||
|
|
@ -90,6 +97,8 @@ namespace tp {
|
|||
List<std::pair<InputID, InputEvent>> mEventQueue;
|
||||
|
||||
// input states
|
||||
Vec2F mPointerOrigin = { 0, 0 };
|
||||
|
||||
Vec2F mPointer;
|
||||
Vec2F mPointerPrev;
|
||||
Vec2F mScrollDelta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue