| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #include "WallpaperEngine/Input/CMouseInput.h"
- #include <glm/vec2.hpp>
- namespace WallpaperEngine::Render::Drivers {
- class CGLFWOpenGLDriver;
- }
- namespace WallpaperEngine::Input::Drivers {
- /**
- * Handles mouse input for the background
- */
- class CGLFWMouseInput final : public CMouseInput {
- public:
- explicit CGLFWMouseInput (Render::Drivers::CGLFWOpenGLDriver* driver);
- /**
- * Takes current mouse position and updates it
- */
- void update () override;
- /**
- * The virtual pointer's position
- */
- [[nodiscard]] glm::dvec2 position () const override;
- /**
- * @return The status of the mouse's left click
- */
- [[nodiscard]] MouseClickStatus leftClick () const override;
- /**
- * @return The status of the mouse's right click
- */
- [[nodiscard]] MouseClickStatus rightClick () const override;
- private:
- Render::Drivers::CGLFWOpenGLDriver* m_driver;
- /**
- * The current mouse position
- */
- glm::dvec2 m_mousePosition;
- glm::dvec2 m_reportedPosition;
- MouseClickStatus m_leftClick;
- MouseClickStatus m_rightClick;
- };
- } // namespace WallpaperEngine::Input::Drivers
|