Skip to content

Commit

Permalink
Allow disabling window resize
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Dec 28, 2023
1 parent cc88b86 commit cff060c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ammonite/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ namespace ammonite {
*yPos = tempStorage.yPos;
}

void setWindowResizable(bool resizable) {
glfwSetWindowAttrib(windowPtr, GLFW_RESIZABLE, resizable);
}

bool getWindowResizable() {
return glfwGetWindowAttrib(windowPtr, GLFW_RESIZABLE);
}

bool getFullscreen() {
return isFullscreen;
}
Expand Down
3 changes: 3 additions & 0 deletions src/ammonite/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ namespace ammonite {
void setWindowGeometry(int width, int height, int xPos, int yPos);
void getWindowGeometry(int* width, int* height, int* xPos, int* yPos);

void setWindowResizable(bool resizable);
void getWindowResizable();

bool getFullscreen();
GLFWmonitor* getFullscreenMonitor();
int getMonitors(GLFWmonitor*** monitorsPtr);
Expand Down

0 comments on commit cff060c

Please sign in to comment.