Commit graph

1880 commits

Author SHA1 Message Date
Subhraman Sarkar
03a46f1d7c
Combobox, Tab Container and Editability in Text Box (#8390)
* new combobox and tab container widgets
* ediability in text box via the editable key
2024-05-06 09:56:44 +05:30
pentarctagon
6d12b17d95 add tooltip. 2024-04-27 00:55:24 -05:00
Pentarctagon
b3f6f80010
Add a button to the build info dialog to rerun the migrator. (#8791)
Add-ons: checks for any that exist in the chosen other version but not in the current version.
Preferences: adds attributes that don't exist from the chosen other version's preferences that aren't in the current version's preferences. for attributes that exist in both, use the attributes from the file that was modified most recently.
Credentials: move if the credentials file doesn't exist.

Fixes #7936
2024-04-27 00:45:41 -05:00
Gunter Labes
c2d179f75e
Missed one pair of quotes 2024-04-26 23:39:02 +02:00
Gunter Labes
2099c23e54
Remove unnecessary workaround 2024-04-26 23:33:19 +02:00
Iris Morelle
00cdaaa2d6 gui/language_selection: Additional UI work for clarity
* Moved the Show All Languages checkbox from the main body to the
   bottom left of the dialog to save space and make it more obviously
   connected to the listbox.

 * Changed the Show All Languages checkbox label to reduce the word
   count a tiny bit.

 * Added text regarding translation percentages representing core
   textdomains only.

 * Added a link to gettext.wesnoth.org.
2024-04-24 09:45:13 -04:00
pentarctagon
39987cd1ca Add a Community button to the title screen.
This opens a dialog with links to the forums, discord, etc, plus a donate button that links to Wesnoth's SPI page.
2024-04-15 16:50:42 -05:00
Wedge009
f5c8db7b2f Unit editor: Remove translation mark from image paths. 2024-04-10 22:04:21 -04:00
Iris Morelle
7049166ecc gui/language_selection: Use a custom label for the OK button 2024-04-02 09:51:46 -03:00
Iris Morelle
94cfe18ecc gui/language_selection: Don't force even height for language column
While it sounds like a great idea on paper, in practice having the
language column have the same height on all rows causes issues because
of at least one entry having an unusually tall label because of
non-Latin characters involved in it.

[label] does not support setting the vertical alignment of text — only
the vertical alignment of the widget itself can be set. This doesn't
help in this case because the widget is always as tall as its row —
it's the text's positioning that needs adjusting.

It turns out to be a better look to have all text be vertically
centered by not letting the label's height be dictated by the row's,
and let the layout engine center the label if needed for any reason.
2024-04-02 09:51:46 -03:00
Iris Morelle
7a1d6afafa gui/language_selection: Language dialog overhaul
This overhaul introduces a GUI option to show all languages regardless
of their completion threshold, as well as a side panel including a
general explanation of community translations and how players can
potentially contribute to them, plus a link to the main translations
page on the wiki.

A few points to make here:

 * The URL points to the main page on purpose, since it's meant to be
   a catch-all for all languages regardless of which one the player
   has got selected or configured (those are two different things at
   the moment).

 * There's an issue where when showing all translations, some of the
   non-Latin translation names cause the baseline of the language
   name labels to end up entirely misaligned with the completion
   labels. I am not entirely sure how to fix this right now.

 * Showing all translations alters the dialog's layout permanently. I
   believe there's no way out of this with the current GUI API.

 * We use the stock text colouring function used for unit defence
   values. This might not be entirely ideal because they are all very
   green for translation stats above the minimum threshold, so there's
   basically no variance by default until all translations are shown
   together.

 * An idea could be to add a link to the gettext.wesnoth.org stats
   page in the dialog.
2024-04-02 09:51:46 -03:00
Dalas121
061b2da037
campaign_dialog.cfg - Explain the RNG options better (#8610) 2024-04-01 17:43:39 -05:00
Subhraman Sarkar
0bef2252a1
basic support for filtering campaigns based on completion status (#8451) 2024-03-26 13:24:14 -05:00
Subhraman Sarkar
0b646dec8a New Unit Type Editor UI in Scenario Editor 2024-03-26 13:23:38 -05:00
pentarctagon
06cccdbd4a achievements scrollbar auto 2024-03-26 00:32:34 -05:00
Subhraman Sarkar
d692f6ba12 add changelog and remove achievements dialog changes 2024-03-22 09:45:42 -04:00
Subhraman Sarkar
8c7660ce49 scrollbar and height adjustments for achievements dialog 2024-03-22 09:45:42 -04:00
Charles Dang
1371bc8cb7 GUI2/Simple Item Selector: increase border size 2024-03-11 13:06:44 -04:00
Iris Morelle
f8c4bf2130 gui/outro: New clock-based timing logic for the text fading
This version uses SDL_GetTicks() as a monotonic source to avoid the
previous version's pitfalls, namely the fact that the game's framerate
may not necessarily be a constant, and in particular, the old code
assumed a completely different framerate than what we ended up with
after the texture-based rendering changes in 1.17.x, resulting in an
almost-unnoticeable text fade due to the update() function being
called WAY more often than before.

Note that the reliance on SDL_GetTicks() means the timings break
at some point after 49 days of game runtime, exactly once. This
should result in a visible "jitter" effect if the 32-bits ticks value
wraps around in the middle of a fade sequence, but other than that
it's not that big of a deal to warrant requiring SDL 2.0.18+ for the
64-bit version.

(cherry picked from commit db30ca53ae)
2024-03-05 10:56:50 +01:00
Steve Cotton
d701f626c9 Multiplayer: Add a po hint about "Matchmaking"
(cherry picked from commit 8660561ad9)
2024-03-01 22:38:27 +01:00
Charles Dang
011fa3aa9d Editor: refined Addon Selection prompt 2024-02-24 20:01:37 -05:00
Charles Dang
b0d1b75a9f MP/Staging: don't hardcode bold formatting in translatable strings 2024-02-24 20:00:06 -05:00
Charles Dang
d3739effcf MP/Create Game: bump game label border size 2024-02-24 19:06:18 -05:00
Subhraman Sarkar
8d3a52eb3f
Stop multiline_text from infinite growing and show scrollbar instead
Fixes the following bugs :

Stop scroll_text from growing infinitely and instead show the
scrollbars when the text dimensions exceed the default size of
the underlying multiline_text in some dialogs (such as edit_pbl,
the pbl publishing editor).

Allow horizontal_grow/vertical_grow to work correctly. Currently,
the widget stops vertically growing due to absence of
max_height=0, again in some specific dialogs.
2024-02-17 12:50:09 +01:00
pentarctagon
029da00681 use scroll_text for pbl editor description 2024-02-13 15:37:12 -06:00
Subhraman Sarkar
6c5a8e923d
Spinner and multiline textbox widgets (#8199) 2024-02-13 11:54:34 -06:00
Charles Dang
2836afe644 MP Lobby: increased padding in tab bar 2023-12-27 17:22:55 -05:00
Charles Dang
f45df6f2ee MP Match History: refined design 2023-12-27 00:16:56 -05:00
Charles Dang
6305185d95 GUI2/Button: added a download button definition 2023-12-27 00:16:09 -05:00
Charles Dang
fa248764e6 MP Create Game: increased padding in tab bar 2023-12-27 00:15:35 -05:00
Subhraman Sarkar
f1f67ae5df
Add functionality to Time Schedule Editor (#8066)
selected schedule will write to utils/schedule.cfg on scenario save

HOTKEY_EDITOR_CUSTOM_TODS is disabled unless user loads scenario

custom_tod:Preview button and associated callback added.

editor:translatable attributes now written with leading underscore

editor:support for multiple custom time schedules
2023-12-14 17:12:07 -06:00
Tommy
1fa8946eb1 Update title screen widget blur when closing preferences dialog.
It won't always be necessary, but it's only one frame to render.
2023-11-23 12:30:35 +13:00
Tommy
e24f60fd43 Re-enable blur for various message panels.
This was disabled a long time ago. It might be fixed now.

This reenables blur for character dialogue. I'm not 100% sure what else.
2023-10-28 12:13:33 +13:00
Wedge009
45e537505f Use 'curly' quotes as per typography standard.
[ci skip]
2023-10-23 09:44:50 +02:00
Wedge009
1091fa924f Replace contraction 'it's' with possessive 'its'.
[ci skip]
2023-10-23 09:44:50 +02:00
Wedge009
918ae0b56a
wesnoth-lib review
* Duplicated text
* Favour generic term 'file manager' over Microsoft terminology.
* Clarify language code use.
* Replace inconsistent spelling of 'add-on'.
2023-09-12 19:06:28 +02:00
Pentarctagon
a5cd9d02eb Add label description to dialog. 2023-08-19 10:13:24 -05:00
Jonathan-Kelly
234060e08e Cut hardcoded restrictions on scenario settings
And widen the corresponding 'soft' coded limits for the multiplayer scenario creation screen.
2023-08-18 01:02:22 +02:00
Charles Dang
542fd92744 GUI2/Main Menu: used linear scaling for background (resolves #7741) 2023-08-04 15:34:52 -04:00
Pentarctagon
10997c39a3
Start giving the editor add-on level functionality. (#7719)
The key word of course being "start". This PR changes the editor by default to work at the add-on level instead of in its own separate scenarios and maps directories. The goal is to make the editor more useful generally, but also specifically to make it much easier for players to distribute content they create using the editor:
* When they click the Editor button on the main menu, they will first be prompted to choose an add-on (or mainline), or to create a new add-on.
* When saved, if the scenario cfg is in the format previously generated by the editor, it will be converted to the new format and to use the [multiplayer] tag, the map_file attribute, and have the map data saved to a separate .map file.
* Relatedly, the editor now knows how to handle scenarios with the map_file attribute at all (which yes, does mean that currently wesnoth's editor doesn't know how to load its own mainline scenarios from their cfg).
* When opening the file chooser dialog, it now defaults to their selected add-on's directory.

If they choose to create a new add-on, then the editor creates for them:
* a basic but functional _main.cfg.
* an empty achievements.cfg (at this point mostly just so they might see it at some point and realize achievements exist, but ideally an achievements editor dialog could be created eventually).
* an empty _server.pbl file.
* a proper add-on directory structure containing the standard set of folders (maps/, scenarios/, units/, utils/, images/, etc).

Additionally, as an initial proof of concept for actually using this new add-on level functionality, a new Add-ons dropdown has been added to the editor's top bar, with a pbl editor option. This allows populating the blank _server.pbl file as well as editing an existing _server.pbl. There is also an option to change the add-on's ID, which will update the add-on's folder name and _main.cfg.

Misc other changes:
* The ability to add a recruit list to a side has been added back as a text box on the edit side dialog. While admittedly this doesn't allow players to select units from within the editor itself, it does set the actual side's recruit list (rather than a specific unit's extra_recruits), will show the user what the current recruit list for the side is (which the previously removed implementation didn't show anywhere), and correctly sets the faction as Custom so that the recruit list is used.
* When saving an old-style editor scenario, everything that can be triggered via [event] is either moved to a start event with a specific id attribute. Exceptions to this are [time], [side], and [side][village]. This is done so that the editor can know (for the most part) what things are actually its own to safely replace. As such, aside from the three previously mentioned tags plus the start event, any other WML added to a scenario by a UMC author is preserved rather than being overwritten - the editor no longer replaces the entire contents of the scenario file.
* The editor no longer writes out cfg files missing the top level scenario tag. If it doesn't find one or this is the first save of a new scenario it defaults to [multiplayer], but otherwise it will properly handle finding [test] or [scenario] as well.
* Requires that map files have the .map extension and scenario files have the .cfg extension. Also it assumes that .map files do actually only have map data in them and the .cfg files do actually have valid WML in them. I understand that this is not a limitation it had previously, but I don't think this is an unreasonable thing to require.
* Addresses part of #7667 by just not using regex for figuring out the map_data attribute value.

Additionally, it is not possible to change the currently selected add-on without going back to the main menu, clicking the editor button, and choosing a different add-on. This is intentional - I don't want to deal with having multiple add-ons open at the same time. If someone feels really strongly otherwise, then they can implement that themselves later.
2023-07-19 15:00:14 -05:00
Iris Morelle
9893e0b49d
gui/preferences: Additional relabelling
* Team colors -> Team color indicators
 * Grid -> Grid overlay
2023-06-11 20:13:51 -04:00
Iris Morelle
fb617638a4
gui/preferences: Drop redundant 'Show' at the start of some options 2023-06-10 16:38:02 -04:00
Iris Morelle
36510e5dc9
gui/preferences: Relabel and retooltip Show floating labels 2023-06-10 16:38:02 -04:00
Iris Morelle
edd14a7233
gui/preferences: Clarify themes tooltip
Mentions that additional themes may be provided by add-ons.
2023-06-10 16:38:02 -04:00
Iris Morelle
6b635f3072
gui/preferences: Relabel some Display options
* Resolution options now use "Window size" instead since it is more
   accurate to the current implementation of fullscreen

 * Theme becomes "Interface theme" to make its meaning clearer in the
   absence of additional built-in themes

 * "Automatic pixel scale multiplier" just becomes "Automatic scale"
   since the rest can be inferred from the context of the option being
   located right under the Pixel scale multiplier slider
2023-06-10 16:38:02 -04:00
Iris Morelle
d402da4e11
gui: Rearrange Display Preferences
This regroups some of the display options together in more logical
blocks:

 - Limit FPS and VSync with Resolution and Pixel scale multiplier
 - Theme and Show floating labels/team colors/grid
 - Animated map and Animated water
 - Show unit idle/standing animations

(Unwieldy diff because of all the grid reshuffling)
2023-06-10 16:38:02 -04:00
Iris Morelle
f7c879a171
gui/preferences: Make Themes selection a dropdown menu
Note that this doesn't remove the themes dialog functionality, since
it is currently used by the :theme command in the game console.
2023-06-10 16:38:02 -04:00
Iris Morelle
a92ae5c86a
gui/game_version: Minor layout tweaks to Log File button
* Make the label more compact for translations ("Log File" instead of
   "Open Log File")
 * Make the tooltip slightly more specific about the file's identity
 * Relocate the button to the bottom row to use real estate better
2023-06-04 22:18:19 -04:00
Iris Morelle
acd9429a23
gui/game_version: Fix Open Log File button being missing
In commit fc7c87b765 someone missed the
logic surrounding the Open Log File button's setup that should've been
made not Windows-specific anymore.

This commit enables the Open Log File button back whenever Wesnoth has
a log file open for the current session. It also removes a few more
leftovers of the old Windows-specific UI layout path.
2023-06-04 22:18:18 -04:00
Gothyoba
0005a2eb23 Fixed old typo in definition of unit recruit window 2023-05-31 11:00:43 -05:00