* Remove the redundant explicitly-defined default ctor for
game_config::server_info() as it does nothing than the compiler's
default doesn't already do.
* Use emplace_back() in the only way that works without giving the
compiler a migraine.
There has been functionality to manage custom servers in the player's
preferences file since as far back as commit
5fb0b2a91123474d147c9de4918fc11a1b4c15ac 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.
The old names still work but are deprecated.
In addition, all the moved functions now accept either a side number or a side userdata as the first parameter.
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 reverts commit 51d6402453db08d3add2cdb571abbf1d60272142.
After discussion with @gfgtdf it was determined that this is not a useful feature after all, since it was in fact the default behaviour for the optimized path.
This means that they are now added to the interface module by default in C++, and only duplicated to the Wesnoth module in Lua.
Some additional functions were moved:
- wesnoth.scroll -> wesnoth.interface.scroll
- wesnoth.zoom -> wesnoth.interface.zoom
- wesnoth.get_mouseover_tile -> wesnoth.interface.get_hovered_hex
- wesnoth.color_adjust -> wesnoth.interface.color_adjust
- wesnoth.set_menu_item -> wesnoth.interface.set_menu_item
- wesnoth.clear_menu_item -> wesnoth.interface.clear_menu_item
Added wesnoth.units.get_hovered as an alias of wesnoth.interface.get_displayed_unit