mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -142,6 +142,13 @@ Message *Event::convert(SDL_Event &e)
|
||||
case SDL_QUIT:
|
||||
msg = new Message("quit");
|
||||
break;
|
||||
case SDL_VIDEORESIZE:
|
||||
arg1 = new Variant((double) e.resize.w);
|
||||
arg2 = new Variant((double) e.resize.h);
|
||||
msg = new Message("resize", arg1, arg2);
|
||||
arg1->release();
|
||||
arg2->release();
|
||||
break;
|
||||
}
|
||||
|
||||
return msg;
|
||||
|
||||
Reference in New Issue
Block a user