Added love.window.isVisible

This commit is contained in:
Alex Szpakowski
2013-05-20 06:25:51 -03:00
parent 4718267c31
commit 2b54ea23de
5 changed files with 17 additions and 0 deletions
+5
View File
@@ -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);
+2
View File
@@ -59,6 +59,8 @@ public:
bool hasFocus() const;
bool hasMouseFocus() const;
bool isVisible() const;
void setMouseVisible(bool visible);
bool getMouseVisible() const;