This allows using full markup for the license text and making it
independently scrollable without messing up the dialog. It also enables
URL parsing in it.
Rather than having everything in the MOTD, this adds a separate button that will popup a window which will have most of this information in two tabs:
* General server information, such as a link to the CoC.
* Announcements, such as tournaments and new versions being released.
The information on this new window will be stored in the new `server_config` database table.
The MOTD will then just be a short greeting instead of the several lines that are shown currently.
Additionally, now the motd will only be displayed in the lobby chat the first time the user logs on.
* Make the default variation's label "Default Variation" instead of
just "Default" (see below).
* Drop the "Variation:" and "Gender:" labels as they take up valuable
real estate and aren't strictly necessary since the controls they are
attached to are very much self-explanatory. This is a debug mode
utility dialog anyway.
* Swap the order according to option importance -- gender is usually
thought of as more of an essential property of units than their type
variation, especially since unit types with multiple variations are
rare in mainline. This means that the gender options are now on the
left instead of on the right.
* Improve display alignment for the variation/gender options row.
Yes, we already know it's a debug mode functionality. It says so on the
context menu and we needed to use :debug to get here. No need to make
the dialog caption pointlessly long.
These changes to the data/gui subdirectories make it so that above a certain
screen pixel dimensions (currently 1200x900), text font sizes will be scaled
with the pixel pitch of the SDL video device. In addition, several dialogues
(such as the unit recall window, for example) are allowed to take on larger
pixel dimensions to accommodate the larger (in pixel size) fonts.
This makes it so all states of the text box widget have borders again.
The colours are changed, however, so that the focused state has the
brightest border.
This turned out to be necessary because otherwise the chat input textbox
in the MP lobby completely blends with the chat log box, making it seem
as though it disappears whenever it doesn't have the keyboard focus.
[ci skip]
There has been functionality to manage custom servers in the player's
preferences file since as far back as commit
5fb0b2a911 in June 2007, but there's never
been a user interface for it.
This commit removes the current server list dialog attached to the MP
Connect dialog and replaces it with the same functionality embedded into
the latter, as well as the ability to edit the server list in the
player's preferences file. There's some code movement in a few other
places since the previous function in the preferences namespace doesn't
suit the new code (it always returned a combined list of game and
player-defined servers).
There's some disabled code referencing a situation where the listbox
with the list of servers allows the code (and the player) to clear the
selection. It's disabled because there are some UX issues with it noted
in the code comments associated to it.
Fixes#4564.
Following the previous commit altering the progress bar's styling, we
now rearrange the dialog to completely eliminate visual gaps during
add-ons server connection by having the status display share a row with
the Cancel button so as to not force extreme layout recalculations. The
status display is also smaller corresponding with its lesser importance
compared to the progress bar itself, which has now become the absolute
centerpiece of the dialog by taking up almost all of its horizontal
space even when the descriptive text is short.
There's an engine change in this, recommended by Vultraz to avoid
recalculating the UI unnecessarily during network transfers. It
necessitates a minor hack in the WML to ensure that the status label has
a non-0 initial size, but it's nothing too major.
The old design was heavily based on the old GUI0 loadscreen, inheriting
the weird blocky 3D shading effect reminiscent of the old Windows 9x
times. This makes it look very obviously out of place with the current
Wesnoth UI look and feel.
We increase the default width of the progress bar to reduce visual gaps
between different phases of the add-ons client's initial connection
sequence, and decrease the height to something that is more in
proportion with the font size without taking up more space than
necessary. The colours are inspired by the current textbox and button
widgets while keeping consistency with the rest of the game's UI.
[ci skip]
This gives GUI2 textboxes (and password boxes since they are a subclass)
a simple hover effect by extending the canvas definitions for the widget
accordingly.
This extends to a few other button labels used for replay control. While
checking if commit 46dbbc06c9 was fit for
backporting to 1.14 I found out that "Play" was already in use
exclusively for one of the replay control buttons (which means, no, it
can't be backported). This makes the disambiguation markers absolutely
necessary.
To give a more practical example of why this is a big deal, in Spanish,
"Play" would be translated as "Jugar" in the context of the Campaigns
menu, and "Reproducir" in the context of a replay (or movie). The
Spanish translation in fact already uses the latter in both 1.14 and
master.
[ci skip]
I can see this dialog running out of vertical space on my Wine
configuration and winding up a victim of the dreaded Dialog-Wide
Scrollbar Syndrome.
[ci skip]
* Return paths from fs API in the native format, not the generic
format. The generic format looks wholly out of place on Windows.
* Move the versions selector to the row with the dialog caption and
Search box as per d53ca602b8.
* Relabel options to make the purpose of the combobox clearer even
without the tooltip.
* Fix markup not being taken into account for the combobox option
labels, and protect against potential markup characters in paths
(shouldn't happen on Windows but it can happen on POSIX platforms).
Credit to @shikadiqueen for the idea. This fixes potential crashes if the padding can't fit on certain resolutions.
Also keeps the vertical spread consistent between resolutions (no more < 800 height handling).
We're going to be using NN scaling for the map, and that's already handled automatically
by SDL (and in the future, OGL). We don't need these settings for surface SCALED_TO_ZOOM
and SCALED_TO_HEX scaling. In any case, if we want to scale a surface to zoom or hex, it
will almost certainly be for map rendering (such scaling methods don't make sense in the
UI, for example), so just defaulting to NN is simplest.
This change drops the option to use Linear or xBRZ scaling for map zooming. This was already
the practical case due to me converting map rendering to use textures. NN was used for all
zoom levels, and it's fast and looks good.
Several dialogs have Search boxes accompanying a central element, with
the boxes taking up a whole row of their own. For both aesthetic and
space allocation purposes it turns out to be more convenient to relocate
these boxes to the top right corner of the dialog to share room with the
dialog's caption.
This only applies to the Campaigns menu, Load Game, Create Unit, and
Recall Unit dialogs. The Recruit Unit dialog, interestingly enough,
already used this approach (an accident?).
Chat Log and the Add-ons Manager *could*, in theory, use this same
change, but they are a bit trickier because of the additional controls
attached to the Search box -- especially so in the Add-ons Manager's
case.
[ci skip]