Added SetFullScreen and Maximize function to Window

This commit is contained in:
Antoine Pilote
2024-08-07 12:44:20 -04:00
parent b2bc19b8d0
commit 0e8484f36d
4 changed files with 23 additions and 10 deletions

View File

@@ -272,6 +272,18 @@ namespace Nuake
glfwSetWindowAttrib(m_Window, GLFW_DECORATED, enabled);
}
void Window::SetFullScreen(bool enabled)
{
const auto monitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
glfwSetWindowMonitor(m_Window, monitor, 0, 0, mode->width, mode->height, GLFW_DONT_CARE);
}
void Window::Maximize()
{
glfwMaximizeWindow(m_Window);
}
void Window::InitImgui()
{
ImGui::CreateContext();