Commit graph

1878 commits

Author SHA1 Message Date
Iris Morelle
10d578bb7b gui2/campaign_selection: Use "Timeline" for the timeline sorting header
It's more elegant in context than "dates".
2020-12-19 03:47:54 -03:00
Iris Morelle
19004a6950 gui2/panel: Avoid using images and just draw rectangles
The opacity used here for the fill colour is identical to the one used
in the image file.
2020-12-19 03:47:54 -03:00
Iris Morelle
4b5eabdfb0 engine: Control experimental PRNG option via game classification
This removes the use_prng Advanced Preferences option and replaces it
with a new possible value for randomness in the game classification
class, "biased". It also changes the enumeration label for it in the
GUI2 campaign dialog.

It also makes it so the synced RNG is automatically used with this
option as well as the existing deterministic randomness option ("save
random seed").
2020-12-19 03:47:54 -03:00
Iris Morelle
ac53f93004 gui2/campaign_selection: Major dialog overhaul
CC: issue #4543

(N.B. This is a monolithic mega-commit because of a bunch of
experimental phase changes that necessitated constant changes to both
engine code and UI WML.)

This redesigns the campaign selection dialog implementing a
campaign-defined background image that changes depending on the selected
campaign, specified by the [campaign] background= attribute; adding a
menu button for selecting the RNG mechanism in use (default RNG vs.
predictable RNG a.k.a. "save random seed"); and finally, adding a menu
button for selecting the campaign difficulty without having to go
through the campaign difficulty selection dialog.

A huge amount of changes to the UI WML were required for this to say the
least.

This also adds the following new widget definitions:

 * toggle_button: listbox_header_centered, listbox_header_bg,
   listbox_header_centered_bg
 * panel: panel_listbox_bg, campaign_menu_bg

As a side effect, two private methods in
gui2::dialogs::campaign_selection() are no longer const-qualified. No
idea why they were const-qualified in the first place, but it
interferred with some of the new code in a major way.
2020-12-19 03:47:54 -03:00
Charles Dang
3118f34798 GUI2/Screenshot Notification: use action_browse definition for browse button 2020-12-19 11:32:14 +11:00
Charles Dang
5feaf973ce
Merge pull request #5363 from shikadiqueen/feature/addonmg-url-ux
gui2/addon_manager: Replace URL widgets with a single link label
2020-12-17 04:46:15 +11:00
Charles Dang
c65db9acbb GUI2: added _WIDGET_DEBUG_BORDER macro 2020-12-16 19:18:29 +11:00
Iris Morelle
cc052ed5a5 gui2/game_version: Minor streamlining 2020-12-15 19:49:40 -03:00
Iris Morelle
599509eb52 gui2/addon_manager: Replace URL widgets with a single link label
The URL widgets (textbox + copy button + browse button) predate the
implementation of link-awareness in labels and they sort of got carried
over into the new design magically without there being a real need for
that. Now that we have a visible cursor change when hovering links it's
even less necessary to draw unnecessary attention to the link with a
clunky and unintuitive (greyed out textbox...) interface.
2020-12-15 17:51:08 -03:00
Charles Dang
b3d4a3744d GUI2/Addon Manager: removed link awareness from addon descriptions
Formatting is disabled for these and links require formatting, so this is redundant.
2020-12-15 11:57:33 +11:00
Charles Dang
3ca809d534 GUI2/Player Info: removed redundant grid 2020-12-14 23:53:20 +11:00
Charles Dang
24c8c3bd01 GUI2/Button: restored vertically-offset text positioning
The "plain" centered text looks a little weird with buttons
2020-12-14 23:51:16 +11:00
Charles Dang
17f979d866 GUI2: removed pixel offset from GUI__TEXT_VERTICALLY_CENTRED
Fixes the text of menu_buttons being 1 pixel too high. Seems this is a relic from 2016 and me tweaking the
formula to try and get things more centered in buttons... But in that case, adjustments shuld probably be
directly made to buttons, not here.
2020-12-14 06:21:20 +11:00
Charles Dang
7188781f91 GUI2: made link_aware a per-instance config option rather than per-definition
Back when link awareness was first added (https://github.com/wesnoth/wesnoth/pull/300), this key was added
globally to label definitions alongside link_color. This had the unintended side effect of making *all* labels
link aware, leading to issues such as being able to open a do-you-want-to-open prompt from an instance of the
same ad-infinitum.

This became an active issue after 213453e6cf, since now that labels could capture
focus if link_aware was true - which it always was for most labels - labels in toggle panels would always
grab mouse_motion events and no longer allow their parent toggle panels to gain their hovered states. That
appears to be in keeping with the design of GUI2, and a further evaluation of that issue is needed at a later
time. However, the fact remains that almost every single label was marked as link-aware, even when in almost every
case that was not the desired behavior.

This change move the link_aware config option to individual label and scroll_label instances. The following uses
had this explicitly enabled:

- Addon license prompt
- Addon descriptions
- Campaign descriptions
- The Server Info popup
- The chatbox
2020-12-12 03:03:09 +11:00
Iris Morelle
f49cb62c7c gui2/addon_license_prompt: Fix missing translation mark 2020-12-10 04:34:22 -03:00
Iris Morelle
4fa0ac6357 gui2/addon_license_prompt: Revert caption to just "Terms" 2020-12-10 04:31:02 -03:00
Iris Morelle
8c3918197c gui/addon_manager: Add dedicated license prompt dialog
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.
2020-12-10 00:15:17 -03:00
Charles Dang
1a2ed5df44
Merge pull request #5248 from Hejnewar/Allow-users-to-set-chat-lines-to-0
Allow users to set chat lines to 0.
2020-11-14 17:28:06 +11:00
kabachuha
ec19ddd1db display addon versions as a dropdown list 2020-11-09 09:43:57 +03:00
Hejnewar
404e86746a Allow users to set chat lines to 0.
Allow users to set chat lines to 0. #1082 fix.
2020-10-28 16:22:47 +01:00
Charles Dang
9376cf42af Removed Registered Users Only game config option (resolves #4980) 2020-10-08 21:16:41 +11:00
Charles Dang
7135927d8a Added Press ESC to skip text
[ci skip]
2020-10-06 13:40:01 +11:00
Charles Dang
c3e578ba80 Repurposed Outro dialog for campaign-specific credits 2020-10-04 23:21:33 +11:00
Pentarctagon
f996803cf6 A separate button for info/announcements.
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.
2020-07-30 13:17:22 -05:00
Iris Morelle
fa08ff291b gui2/button: Fix highlight colour for the disabled state
It was apparently copy-pasted from the pressed state. This resulted in
disabled buttons looking like they are pressed.

[ci skip]
2020-07-27 06:02:53 -04:00
Iris Morelle
17b5d5420e gui2/file_dialog: Use golden headers above list views 2020-07-22 01:25:12 -04:00
Iris Morelle
ea883befcf gui2/preferences: Use labelless toggle buttons in Advanced
The labels are implemented with a different widget on a separate column,
the the reserved space only serves to make things look weird.
2020-07-19 21:53:44 -04:00
Iris Morelle
75344d0ec1 gui2/mp_alerts_options: Clean-up table column/row headers
Yes, this UI is effectively a table in the truest sense of the word.
2020-07-19 21:39:32 -04:00
Iris Morelle
3ecc7cb834 gui2/unit_create: UI refinements
* 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.
2020-07-09 17:42:15 -04:00
Iris Morelle
be4b927fd8 Add unit variation selection to the Create Unit dialog
Surprisingly, this involves quite a few API changes to enable the Create
Unit command to specify a unit variation id.
2020-07-09 17:42:15 -04:00
Iris Morelle
c489ffab59 gui2/unit_create: Remove "Debug!" part of the dialog caption
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.
2020-07-09 17:42:15 -04:00
Iris Morelle
9c5b2ef344 gui2/mp_alerts_options: Use labelless checkboxes
This fixes an issue where the checkboxes are slightly misaligned
relative to the headings because of the extra space they reserve to the
right.
2020-07-06 23:25:39 -04:00
Iris Morelle
5afb96e808 gui2/toggle_button: Add a checkbox variation without a label 2020-07-06 23:25:05 -04:00
Iris Morelle
c9747c0db5 gui2/logging: Add filtering functionality
To make it easier to find log domains among the giant list.
2020-07-06 21:32:27 -04:00
Iris Morelle
d186a8ba15 gui2/logging: Improve dialog's aesthetics
This makes it look less like programmer art by adding some headings and
a better list layout.
2020-07-06 21:32:27 -04:00
Iris Morelle
e2c5b923fb gui2/toggle_button: Add a radio button variation without a label 2020-07-06 21:32:27 -04:00
Glen Whitney
acd08fd0c5 Scale fixed-size dialogue window capped by screen size percentage 2020-06-29 19:18:38 -04:00
Glen Whitney
8ba16c972a Scale buttons and toggle buttons with screen pitch also. 2020-05-26 16:20:52 -05:00
Glen Whitney
b91b5095e5 Work around issue #4908. 2020-05-21 11:23:23 +02:00
Glen Whitney
f3a472ab96 Modify GUI2 config files to scale font size with screen pixel pitch
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.
2020-05-16 15:01:01 -05:00
Iris Morelle
af60f10391 gui2/text_box: Re-do borders for all states
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]
2020-01-24 01:43:53 -03:00
Charles Dang
954d0cdc00 GUI2/Text Box: restored border on disabled state
[ci skip]
2020-01-22 23:31:38 -05:00
nemaara
5c9077dc41
Merge pull request #4568 from nemaara/language_icon
Title screen: move language button to icon
2019-11-17 19:22:42 -05:00
nemaara
32eb921d2d
Merge pull request #4566 from nemaara/tutorial_cleanup
Tutorial: move from title screen to campaign menu
2019-11-17 18:06:06 -05:00
Iris Morelle
f136bb9ef3 gui2/mp_connect: Overhaul dialog adding a more powerful server list
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.
2019-11-17 18:05:29 -03:00
Iris Morelle
b56bf27604 gui2/game_save: Give the OK button a custom label
[ci skip]
2019-11-17 18:05:29 -03:00
Iris Morelle
06719958da gui2/addon_connect: Use icon button for Help
[ci skip]
2019-11-17 18:05:29 -03:00
Iris Morelle
34d45d3ee5 gui2/network_transmission: Modernize appearance
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.
2019-11-17 01:49:15 -03:00
Iris Morelle
335e5ccdf3 gui2/progress_bar: Modernize appearance
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]
2019-11-17 01:49:15 -03:00
nemaara
4282d0b112 Tutorial: move from title screen to campaign menu 2019-11-16 15:11:55 -05:00