Reworking API upon suggestion.
This commit is contained in:
parent
c743734235
commit
6056a2a5cf
3 changed files with 21 additions and 12 deletions
23
src/core.c
23
src/core.c
|
|
@ -831,22 +831,29 @@ void SetWindowSize(int width, int height)
|
|||
#endif
|
||||
}
|
||||
|
||||
// Set window visibility
|
||||
void SetWindowVisible(bool visible)
|
||||
// Show the window
|
||||
void ShowWindow()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
if (visible) glfwShowWindow(window);
|
||||
else glfwHideWindow(window);
|
||||
glfwShowWindow(window);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set window visibility
|
||||
bool IsWindowVisible()
|
||||
// Hide the window
|
||||
void HideWindow()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
return glfwGetWindowAttrib(window, GLFW_VISIBLE) != GL_FALSE;
|
||||
glfwHideWindow(window);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if window is currently hidden
|
||||
bool IsWindowHidden()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
return glfwGetWindowAttrib(window, GLFW_VISIBLE) == GL_FALSE;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get current screen width
|
||||
|
|
|
|||
Loading…
Reference in a new issue