[wish] Spielfenstergröße dynamisch veränderbar

Bug #522278 reported by Stefan Kriwanek (Divan)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Return To The Roots
Status tracked in S25client
S25client
Fix Released
Wishlist
FloSoft

Bug Description

Was mich schon immer nervt: Man kann die Größe des Spielfensters nicht einfach per Ziehen ändern (im windowed-mode) Obwohl sich das recht einfach implementieren lässt, jedenfalls in einigen Situationen, im Spiel selbst z.B. .

Das mach ich dann auch gleich, wenn niemand was dagegen hat.

Tags: all-rev
Changed in s25rttr:
assignee: nobody → Divan (n-contact-stefankriwanek-de)
FloSoft (flosoft)
tags: added: all-rev
FloSoft (flosoft)
summary: - Spielfenstergröße veränderbar
+ [wish] Spielfenstergröße dynamisch veränderbar
Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

Ist doch recht umfangreich geworden, aber man kann nun überall das Spielfenster resizen.
Praktisch alle Controls haben nun eine Resize-Methode, mit der sie ihre Größe ändern können.
Das ließe sich leicht benutzen, um auch Ingame-Fenster größenveränderbar zu machen, z.B. das Map-Fenster oder die iwHelp-Dinger oder Spiel-Laden/Speichern. Diese müssen dann bloß die Neuanordnung der Controls selber übernehmen. Naja, vielleicht kommt das ja noch später von mir...

Das Abspeichern der Fenstergröße in der CONFIG.INI und Anzeigen im Spiel könnte man sicherlich noch mal überdenken..

Nur Linux/Mac mit SDL, weil ich alles andere nicht testen kann, wie immer.
Ansprechbar bin ich erst wieder ab 5.3., bis dahin ist Urlaub :)

Revision history for this message
FloSoft (flosoft) wrote : Re: [Bug 522278] Re: [wish]Spielfenstergröße dynamisch veränderbar

patch is broken, please merge it again with current version, thank you

Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

Here you are.
I'd do something to save windowed and fullscreen resolution separately in some days.

Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

Did the separately-saving-thing.
Added possibility to change between fullscreen and windowed mode by pressing alt+enter.

It would be great if someone adds code for and tests Windows SDL's and WinApi's and GLFW's possibility to open a resizable window, for it is now the only way of changing window size (except from config file):
- For the WinApi and GL driver: look at- driver/video/SDL/src/SDL.cpp from line 371 on for the way to react on the driver's resize event
- Resizability has to be activated when creating the window; driver/video/SDL/src/SDL.cpp from lines 183, 242

Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

Reminder ;) :
FloSoft, it would be great if you look upon and/or merge it, if you find some time.

Revision history for this message
FloSoft (flosoft) wrote :

applied in rev6177

Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

There are problems with Windows, because there's no way to define windowed size anymore. This patch should solve it by not considering two independent sizes (windowed, fullscreen) on Windows and thereby restoring the old behaviour.

It also disables the auto-resizing code and solves the "minimum 800x600" problem simply by clipping if the window is too small.

I hope this circumvents the current regressions caused by my feature. At least on Linux/X it works great.

Please, can someone test resizable WinApi and/or SDL windows on the Windows platform as I described above?!

Revision history for this message
FloSoft (flosoft) wrote :

applied by jh in rev6202

Revision history for this message
Stefan Kriwanek (Divan) (dev-stefankriwanek) wrote :

Fixing the minimize and/or deactivating in Windows and reactivating alt+enter on SDL Windows. Fixing wrong mouse position in WinAPI windows. Fixing a runtime warning when executed in VisualStudio debug mode.
Windows' windows aren't resizable yet, they have the old behaviour fully restored. Work is in progress.
First time tested on Windows!!! ;)

NastX reported a wrong mouse position when the window is clipped (<800x600, not possible on Windows), this doesn't happen for me. Anyone else noticing this?

Revision history for this message
jh (janhenrikk) wrote :

applied in rev6210

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.