3 #if defined(LUG_SYSTEM_WINDOWS) 5 #elif defined(LUG_SYSTEM_LINUX) 7 #elif defined(LUG_SYSTEM_ANDROID) 12 #error "Unsupported operating system or environment" 27 std::unique_ptr<Window> win(
new Window());
29 if (!win->init(initInfo)) {
37 if (
_impl !=
nullptr) {
194 return _impl !=
nullptr;
198 if (
_impl !=
nullptr) {
244 if (
_impl !=
nullptr) {
250 if (
_impl !=
nullptr) {
256 if (
_impl !=
nullptr) {
276 if (
_impl !=
nullptr) {
TouchScreenEvent _touchScreenState
void setMousePos(const Math::Vec2i &mousePosition)
Sets the mouse position.
std::unordered_map< Keyboard::Key, bool > _keyState
const Math::Vec2i & getMousePos() const
Retrieves the mouses position.
void setKeyRepeat(bool state)
Enables or disables key repeat.
void close()
Close the window gracefully.
bool init(const Window::InitInfo &initInfo)
Key
Abstraction of keyboard keys.
Button
Abstraction of Mouse buttons.
void setMousePos(const Math::Vec2i &mousePosition)
void initMouseState()
Inits every button in _mouseState to false.
Type type
The type of the event.
void initKeyState()
Inits every key in _keyState to false.
bool isMousePressed(Mouse::Button button) const
Determines if a mouse button pressed.
void setMouseCursorVisible(bool visible)
bool init(const InitInfo &initInfo)
bool pollEvent(lug::Window::Event &event)
void setKeyRepeat(bool state)
bool isKeyPressed(Keyboard::Key key) const
Determines if a key pressed.
GamePadEvent _gamePadState
std::unordered_map< Mouse::Button, bool > _mouseState
Math::Vec2i _mousePosition
static std::unique_ptr< Window > create(const InitInfo &initInfo)
Utility to create a window.
Math::Vec2i getWindowSize() const
Gets the window size.
bool isOpen() const
Determines if the window is open.
virtual bool pollEvent(lug::Window::Event &event)
Checks if an event is available from the window implementation, and fill it in the event parameter...
void setMouseCursorVisible(bool visible)
Sets the visibility of the mouse cursor (hide/show)