Use a flags table for setMode now, implement resizable and borderless windows, and add resize event

Example setMode invocation: love.graphics.setMode(800, 600, {fullscreen = false, vsync = true, borderless = true})
t.screen.resizable and t.screen.borderless are available in love.conf
And love.resize(w, h) gets called if it exists on a resize event.
NOTE: love.handlers.resize(w, h) does the required setMode, but that does mean a visual reload

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2012-07-23 11:53:13 +02:00
parent 787bb868a1
commit bddee1753b
9 changed files with 185 additions and 48 deletions
+4 -2
View File
@@ -37,8 +37,8 @@ public:
Window();
~Window();
bool setWindow(int width = 800, int height = 600, bool fullscreen = false, bool vsync = true, int fsaa = 0);
void getWindow(int &width, int &height, bool &fullscreen, bool &vsync, int &fsaa);
bool setWindow(int width, int height, WindowFlags *flags = 0);
void getWindow(int &width, int &height, WindowFlags &flags);
bool checkWindowSize(int width, int height, bool fullscreen);
WindowSize **getFullscreenSizes(int &n);
@@ -72,6 +72,8 @@ private:
bool fullscreen;
bool vsync;
int fsaa;
bool resizable;
bool borderless;
} currentMode;
bool created;
bool mouseVisible;