mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Added love.window.hasMouseFocus (issue #120)
This commit is contained in:
@@ -305,6 +305,11 @@ bool Window::hasFocus() const
|
||||
return (SDL_GetAppState() & SDL_APPINPUTFOCUS) != 0;
|
||||
}
|
||||
|
||||
bool Window::hasMouseFocus() const
|
||||
{
|
||||
return (SDL_GetAppState() & SDL_APPMOUSEFOCUS) != 0;
|
||||
}
|
||||
|
||||
void Window::setMouseVisible(bool visible)
|
||||
{
|
||||
SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE);
|
||||
|
||||
@@ -57,6 +57,8 @@ public:
|
||||
void swapBuffers();
|
||||
|
||||
bool hasFocus() const;
|
||||
bool hasMouseFocus() const;
|
||||
|
||||
void setMouseVisible(bool visible);
|
||||
bool getMouseVisible() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user