Added love.window (issue #6.) All window-related functions have been moved from love.graphics to love.window.

love.graphics.setCaption has been renamed to love.window.setTitle.
This commit is contained in:
Alex Szpakowski
2013-05-10 22:32:15 -03:00
parent 13dd8d3199
commit ff77eb4b29
21 changed files with 555 additions and 478 deletions
+8 -1
View File
@@ -55,8 +55,12 @@ Window::_currentMode::_currentMode()
{
}
bool Window::setWindow(int width, int height, WindowFlags *flags)
bool Window::setWindow(int width, int height, graphics::Graphics *graphics, WindowFlags *flags)
{
if (graphics)
graphics->unSetMode();
bool fullscreen = false;
bool vsync = true;
int fsaa = 0;
@@ -186,6 +190,9 @@ bool Window::setWindow(int width, int height, WindowFlags *flags)
currentMode.flags.borderless = ((surface->flags & SDL_NOFRAME) != 0);
currentMode.flags.centered = centered;
if (graphics)
graphics->setMode(width, height);
return true;
}
+1 -1
View File
@@ -38,7 +38,7 @@ public:
Window();
~Window();
bool setWindow(int width = 800, int height = 600, WindowFlags *flags = 0);
bool setWindow(int width = 800, int height = 600, graphics::Graphics *graphics = 0, WindowFlags *flags = 0);
void getWindow(int &width, int &height, WindowFlags &flags) const;
bool checkWindowSize(int width, int height, bool fullscreen) const;