Commit graph

1813 commits

Author SHA1 Message Date
Wedge009
765cf1e79f Add screenshots directory to game version dialogue.
Resolves #7096.
2022-11-12 20:34:33 -06:00
Kingofd
4b8d4f1fb5
Adding language filter option in addon menu (#7048)
Resolves #1063
2022-11-05 12:04:55 -05:00
Pentarctagon
5d174a3493 Update lobby tab text. Resolves #7056 2022-11-01 19:24:05 -05:00
Pentarctagon
08e79f4e36 Add filter for bot-hosted games.
Bot-hosted games are now shown in a separate tab from player-hosted games, based on the new auto_hosted attribute on the game creation WML. This is not something that's available to be selected during game creation since it's assumed it will instead be set by the bot implementation. Note that this isn't *really* putting games into two separate tabs, it just looks that way for UI/UX reasons.

Resolves #6939
2022-09-26 09:01:11 -05:00
Pentarctagon
0e85fac29c
Have /report show a dialog for entering information. (#6969)
Resolves #5056
2022-09-02 21:18:03 -05:00
Iris Morelle
532ec4e06f addon/client: Add modeless dialog for displaying add-on install progress
This implements an add-on extraction progress dialog that does not
actually run its own event loop, allowing the caller to take ownership
of it (display() static method) and update its state using a callback
function object. The object in question is passed into the add-ons
management API and used to update the dialog status each time an add-on
file is written to disk as part of the pack extraction process.

In order to avoid stalling the extraction process in UI code, the
callback is invoked for every single file, but the dialog's progress
update method places a time restriction on GUI2 API calls of 120
milliseconds -- this is a good throttle interval that allows add-ons to
be extracted in about the same amount of time as before while still
updating the progress bar smoothly enough for add-ons that take longer
than that.

(This is not the most trivial code to test, so it is suggested to add a
sleep/delay API call in unarchive_file() in src/addon/manager.cpp to
introduce artificial delays.)

One issue with this code, however, is that because modeless_dialog
doesn't execute its own event loop, the only way to get the dialog to be
updated is to force a draw event in ourselves via the new
gui2::dialogs::modeless_dialog::force_redraw() method. This is really a
side-effect of my design choice here to run the dialog in the middle of
a blocking operation instead of somewhere where events are being
processed normally. I'm not entirely sure if the draw events would be
pushed even in that case, however.

Closes #1101.
2022-08-06 15:11:41 -05:00
Tommy
ebcae03e48 Add a new image tiling mode: "tile_highres" for high-DPI tiled images.
The other options "tile" and "tile_center" work in draw space,
which is consistent with past behaviour, but doesn't look as nice.
2022-06-14 14:48:03 +12:00
Charles Dang
f86c935668 GUI2/Panel: used rect fill color for box display 2022-06-14 14:47:45 +12:00
Tommy
575286cb86 CVideo: remove get_dpi and get_dpi_scale_factor.
screen_pitch_microns is deprecated, and has been removed from the
GUI_SCALE_RESOLUTION macro in WML. The macro itself has been left in
place for potential future use.

The screen_pitch_microns variable has been left in place, but is now
a constant and will only ever return the default value equivalent to
96 DPI.
2022-06-11 05:56:06 +12:00
Tommy
638c02b59e Rename image_shape.vertical_mirror_ to mirror_.
It is in fact (and always was) mirroring horizontally.
2022-05-31 21:17:33 +12:00
Charles Dang
da4a201101 MP/Create Game: don't hardcode random faction mode options
This still means we need to make sure the options are in the same order as in the enum,
but that was also the case in the old code.
2022-05-28 17:11:51 -04:00
Charles Dang
cdd854d5fa GUI2/Unit Preview Pane: used NN-scaled [drawing] for unit image (resolves #6700) 2022-05-24 16:26:06 -04:00
Charles Dang
023bdb7142 GUI2/Preferences: refactored how hotkey categories are handled
Constitutes a further refinement of a688ab77b9.

Instead of getting a list of categories and filtering out those without any hotkeys (custom WML ones,
for example), we generate a set of categories from the list of visible hotkeys when we set up the list.
This ensures we only ever have matching categories for the hotkeys we're seeing and removes the need
for extra global bookkeeping in the category code.

This also ensures the category list is reconstructed when resetting hotkeys. I don't know how categories
could have appeared/disappeared after resetting (the old code should be safe), but this makes sure it
will never be an issue since when visible_hotkeys is changed, so is visible_categories.
2022-05-24 16:09:00 -04:00
newfrenchy83
81d41a861d
Add tooltips to unit_attack dialogs (#6462)
In tooltips, the special and weapon_abilities are listed by stats (damage, attacks and chance to hit), and the owner of each is specified.
2022-05-18 08:54:28 +02:00
Charles Dang
8a960fca68 MP/Create: added button to reset timer settings, ensure they're saved (resolves #1556) 2022-05-06 16:10:45 -04:00
Charles Dang
840799eef4 GUI2/Language Selection: double borders 2022-05-06 02:45:40 -04:00
Charles Dang
e950b5f2ac GUI2/Uninstall Addons: double borders 2022-05-06 02:02:06 -04:00
Charles Dang
64b7624ea2 GUI2/Preferences: doubled borders in advanced prefs 2022-05-05 23:38:30 -04:00
Pentarctagon
9bfd432abe Update image pages for webp extension. 2022-04-30 14:23:32 -05:00
Charles Dang
b6fa7733b3 GUI2/Preferences: made better use of space for display scaling option 2022-04-30 14:20:47 -04:00
Tommy
3a781c87ad Add pixel scale preference option. 2022-04-18 17:25:06 +12:00
Charles Dang
a3b6f57e4d Game Load: revamped design 2022-04-08 03:02:21 -04:00
Charles Dang
6b329a020a Loading Screen: added an (as-yet unused) image background layer 2022-04-08 02:59:11 -04:00
Pentarctagon
95aaac76a9 Store add-on passwords in the credentials file as well.
This allows storing add-on passwords for uploading in the same credentials file as is currently used by the client when connecting to a multiplayer server. For add-on authors that don't keep their passwords as plaintext in their _server.pbl, this removes the need for them to manually enter their password each time they upload an add-on.
2022-03-10 10:23:01 -06:00
Wedge009
0709145670 Resolve title-screen vs main menu inconsistency.
Discussed in #4390 and originally introduced in 7c8c3114.
2021-11-10 11:20:33 +11:00
Charles Dang
65b7baab64 Orb Colors: fixed lack of borders on a label
Also moved this row to the bottom for UI cleanliness
2021-11-05 02:56:07 -04:00
Hejnewar
4fe7751158
Increase the limits of timer values that players can set 2021-11-03 16:07:41 +01:00
Iris Morelle
76b83e623d
gui2/addon_manager: Move Search to the top right on small resolutions 2021-10-26 18:29:34 -03:00
Charles Dang
8fe95f2876 GUI2: increased listbox header toggle heights
Removed borders in the campaign dialog usage to compensate.
2021-10-26 02:14:29 -04:00
Iris Morelle
f96be0298e
Allow enabling the VSync hint on SDL's software renderer
Requires SDL 2.0.17 or later. If an earlier version of SDL 2 is
detected at runtime, the option in Preferences -> Display is hidden and
ignored entirely.

Requires restarting the game because it necessitates recreating the
window.

Closes #5018.
2021-09-25 18:06:33 -03:00
Iris Morelle
3fb9df3b8d
gui2/title_screen: Increase bottom row margins from 0px to 10px
This hopefully makes it seem a little tidier than having all of the
bottom row buttons and labels hugging the edges of the game screen.
2021-09-24 17:59:56 -03:00
Iris Morelle
6303d72806
gui2/title_screen: Give the Language button its label back
This makes the Language button use one of the new title screen button
definitions so it has an actual label in addition to its icon. However,
it also makes the label dynamic to reflect the current language choice.

More specifically, it reflects the current locale's language name, which
turns out requires a surprising amount of effort on our part to obtain.
2021-09-24 17:59:56 -03:00
Iris Morelle
a4054b0af6
gui2/button: Add definitions for special title screen buttons
These buttons have an icon like normal action buttons do, but they also
keep their text label and use a smaller font. Currently only one
instance is provided, for the Language button.
2021-09-24 17:59:35 -03:00
Iris Morelle
5c03595910
gui2/core_selection: Use a more apropos OK label
This is not a string freeze-violating change because the string already
exists in its textdomain.
2021-09-23 17:28:31 -03:00
Iris Morelle
25b7d3d8d0
gui2/core_selection: Allow links to be parsed in core descriptions 2021-09-23 16:27:23 -03:00
Charles Dang
6ca865c8c2 Addon Manager: refined details section design 2021-08-16 17:16:01 -04:00
Charles Dang
95893489f2 GUI2: added default_italic label and scroll_label definitions
This is not optimal, but I'll implement a better way of handling formatting later.
2021-08-16 17:15:31 -04:00
Charles Dang
ca77f7e3e8 GUI2/Faction Select: use an drawing widget for the leader display 2021-08-09 00:58:08 -04:00
Steve Cotton
62a8bad97c Allow the campaign selection to be bigger on HDPI screens
This doesn't scale the campaign image (and the campaign images are generally
350x350 images anyway), so it looks a bit wrong, but it's a lot more useable
on HDPI than putting a 1050x750 limit on a treeview with a text panel.
2021-08-08 19:59:42 +02:00
Charles Dang
b71fbc5946 MP Staging/Join Game: tweak button areas 2021-08-01 02:58:04 -04:00
Charles Dang
ceafd6faa3 MP/Lobby: some more player list-related cleanup
- Improved display
- Removed unused pointer member in helper
- Removed unnecessary extra tree clear step
2021-07-30 23:27:45 -04:00
Charles Dang
19645c0e6c Faction Select: one more tiny refinement 2021-07-23 14:03:22 -04:00
Charles Dang
15436b4c6d Faction Select: refined design 2021-07-23 13:49:18 -04:00
Charles Dang
e7efec907c Preferences: fixed border sizing in MP section 2021-07-20 14:25:53 -04:00
Pentarctagon
e5b4a39242
Add a prompt to migrate data from previous versions of wesnoth.
Currently migrated, if existing:
* Add-ons (redownloaded if present on new add-ons server)
* Preferences file
* Credentials file
2021-07-15 20:16:17 -05:00
Iris Morelle
02b4b5e44d
Merge branch 'feature/addon-ui-tls-indicator' 2021-06-19 13:10:15 -04:00
Iris Morelle
fc50458bb2
gui2/title_screen: Reserve a string for octalot 2021-06-19 11:35:04 -04:00
Iris Morelle
1e26269729
gui2/addon_manager: Add TLS status and server address indicator
This is displayed on the bottom left in "big GUI" mode and on the bottom
middle in "small GUI" mode. The hostname label's colour depends on
whether the connection is actually layered in TLS or not.

The tooltips are kind of a hack because we currently can't set a tooltip
on a grid so it triggers whenever the player mouses over any of its
children or the border/margin space between cells. Instead we set the
same tooltips for both widget pairs via preprocessor trickery and call
it a day.
2021-06-19 11:25:06 -04:00
Iris Morelle
4b40afe052
gui2/label: Add "bad" label variations
These are displayed in #FF0000 red currently.
2021-06-19 07:40:07 -04:00
Iris Morelle
a723cd2c17
gui2/addon_manager: Fix spelling on the Add-on Details button label 2021-06-18 20:50:36 -04:00