mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-16 00:08:15 +00:00
Adding window visibility functions.
This commit is contained in:
18
src/core.c
18
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user