stratagus
stratagus copied to clipboard
Add a mode where the video resolution adjusts to match window or desktop size.
There's already a '-v mode' command line option, so maybe we could add a mode that means use the window/desktop resolution?
eg, -v window or -v desktop or -v dynamic.
Another question is, should this set a minimum window size?
I started playing with a work-in-progress implementation here: dynamic-video-resolution
I ended up calling it dynamic (for now) so the name isn't tied to window or desktop as it should resize regardless of whether it's in windowed or fullscreen mode.
The next step is to hook it up to the lua preferences.
But anything and everything is up for change though so all feedback is appreciated :)
I've updated to include lua bindings.
It's probably about complete for what can go into the engine.
Hopefully it's on the right track.
This looks to me to be on the right track :)
Thanks Tim :)
I've just updated my branch to include a ResolutionChanged event (or callback) because the games themselves (like Wargus) would need to handle resolution changes. If they want to that is...
I wasn't sure where to document this so I've added a new doc file: doc/scripts/events.html
I couldn't find docs for some other events/callbacks (GameStarting, MapLoaded, EditUnitProperties), so we could write something up for them in this file too.
I still need to check the title page drawing (which i suspect is completely handled by stratagus) and the main menu (which might be on the game side).