Adding window visibility functions.

This commit is contained in:
Marco Lizza
2019-01-10 14:55:19 +01:00
parent 5adcc30a2e
commit a15251bcdb
2 changed files with 20 additions and 0 deletions

View File

@@ -831,6 +831,24 @@ void SetWindowSize(int width, int height)
#endif
}
// Set window visibility
void SetWindowVisible(bool visible)
{
#if defined(PLATFORM_DESKTOP)
if (visible) glfwShowWindow(window);
else glfwHideWindow(window);
#endif
}
// Set window visibility
bool IsWindowVisible()
{
#if defined(PLATFORM_DESKTOP)
return glfwGetWindowAttrib(window, GLFW_VISIBLE) != GL_FALSE;
#endif
return true;
}
// Get current screen width
int GetScreenWidth(void)
{