From a15251bcdbcf5f89af3a5b2189aafcc8444948ab Mon Sep 17 00:00:00 2001 From: Marco Lizza Date: Thu, 10 Jan 2019 14:55:19 +0100 Subject: Adding window visibility functions. --- src/core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index b34afeff..36d71fd7 100644 --- a/src/core.c +++ b/src/core.c @@ -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) { -- cgit v1.2.3