Window fullscreen toggle & saving size

This commit is contained in:
@clasher113
2023-11-25 20:01:43 +02:00
parent 7cb73998dd
commit 446edff4c4
5 changed files with 77 additions and 2 deletions
+8
View File
@@ -11,11 +11,16 @@
class GLFWwindow;
class ImageData;
struct DisplaySettings;
struct GLFWmonitor;
class Window {
static GLFWwindow* window;
static DisplaySettings* settings;
static std::stack<glm::vec4> scissorStack;
static glm::vec4 scissorArea;
static bool tryToMaximize(GLFWwindow* window, GLFWmonitor* monitor);
public:
static uint width;
static uint height;
@@ -28,6 +33,8 @@ public:
static void setShouldClose(bool flag);
static void swapBuffers();
static void swapInterval(int interval);
static void toggleFullscreen();
static bool isFullscreen();
static void pushScissor(glm::vec4 area);
static void popScissor();
@@ -36,6 +43,7 @@ public:
static void clear();
static void setBgColor(glm::vec3 color);
static double time();
static DisplaySettings* getSettings();
static glm::vec2 size() {
return glm::vec2(width, height);