mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Added love.window.isVisible
This commit is contained in:
@@ -310,6 +310,11 @@ bool Window::hasMouseFocus() const
|
||||
return (SDL_GetAppState() & SDL_APPMOUSEFOCUS) != 0;
|
||||
}
|
||||
|
||||
bool Window::isVisible() const
|
||||
{
|
||||
return (SDL_GetAppState() & SDL_APPACTIVE) != 0;
|
||||
}
|
||||
|
||||
void Window::setMouseVisible(bool visible)
|
||||
{
|
||||
SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE);
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
bool hasFocus() const;
|
||||
bool hasMouseFocus() const;
|
||||
|
||||
bool isVisible() const;
|
||||
|
||||
void setMouseVisible(bool visible);
|
||||
bool getMouseVisible() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user