Commit graph

1856 commits

Author SHA1 Message Date
Subhraman Sarkar
6980ad04d6 gamestate inspector: use uneditable scroll_text instead of scroll_label
allows text to be selected and copied
2024-08-14 12:03:39 +05:30
Charles Dang
44db56d767 MP/Staging, Join Game: fixed some alignment and formatting issues 2024-08-11 17:00:21 -04:00
Subhraman Sarkar
64caa4acda
Allow quick reload of gui2 themes (#9117)
* New "Apply" button in preferences dialog that is used to quickly apply the GUI2 theme, no restart needed.
* gui initialization reorganized a bit. gui2::init() now responsible for reading themes from file only. Actual theme switching and activation done by gui2::switch_theme(). preferences dependency removed from gui and moved to caller of gui2::init(). gui2 tests updated accordingly.
2024-07-30 07:59:54 +05:30
Subhraman Sarkar
2660c0e086 new ui theme: modern (titlescreen only atm)
Design idea and concept art: Dalas
Implementation: babaissarkar

Co-authored-by: Dalas121 <33790750+Dalas121@users.noreply.github.com>
2024-07-16 13:07:57 +05:30
pentarctagon
f0991ec9c1 remove use of the config directory
the credentials and lan config files will now use the userdata folder
2024-07-08 17:42:20 -05:00
Subhraman Sarkar
9496dd4edf add po hint 2024-07-04 02:31:47 +02:00
Subhraman Sarkar
b6e8142780 use correct font for tick character (#9055) 2024-07-04 02:31:47 +02:00
Subhraman Sarkar
103b80ff01
Editor enhancements (#8903)
Map/Scenario Editor

* Rename Load Map to Load Map/Scenario (since it can load both), Edit Scenario to Edit Scenario Settings, Save Map to just Save.
* Rearrange menu order
* Add icon for the preferences menu item (used the preexisting settings.png icon)
* Open folder correctly at Add-on's scenario directory instead of editor/scenarios. (#8910)
* Show Save Scenario As only for Scenarios
* Use the settings.png icon for Preferences menu item
* Add functionality to "Loyal" checkbox (Unit tool -> Place unit -> Right click menu) (#8445)
* Show warning when maps are saved in scenarios folder or vice versa (#8911)
* Unit List moved to Units menu from File menu to reduce some pressure from the latter.
* Status Table menu item disabled since it does nothing. (Should be reenabled once the functionality has been added.)
* Improve reload functionality in Editor (F5). Reload happens directly from memory and no temp files are needed. Also, the undo/redo stacks will be preserved. (#9024)

Time Schedule Editor

* Browse buttons now set wesnoth style paths instead of just pasting the absolute path returned by the file dialog
* Change text boxes from inactive to uneditable.
* Code generation improvements
* Add copyright notice to tod_new_schedule
* Confirmation messages
* Preview buttons for image and sound files and new icons for the preview button (2 sets : preview image and preview sound)

Unit Type Editor
 * Confirmation messages
 * New icons for the preview button (2 sets : preview image and preview sound)

Add-on menu
 * Two new menu entries for (1) opening the Add-on selection dialog, (2) opening the folder corresponding to the Add-on
The open add-on folder option shows a GUI2 file dialog at the add-on's folder which can be used to open any file. If it is a loadable map/scenario it will be opened in the editor, otherwise the OS's default application for that file will be opened.

File Dialog
 * Redesigned with new icons
 * New Open External button that opens selected file/folder in the platform's default application (independently of what pressing Open would do). This could be used to quickly open a folder or preview the file before actually selecting it.
 * Extension checking and filename validation. (See #8911)
2024-06-29 21:56:54 +05:30
pentarctagon
291be986f6 Revert "GUI2/Addon Manager: make addon id more prominent, debug-only"
This reverts commit 78620c7d61.
2024-06-25 19:18:42 -05:00
Subhraman Sarkar
43f5644e36
Rich Text Label widget for Help Browser GUI2 port (#8655)
A rich text label widget that can show text marked up with help markup.
Also includes the GUI Test Window, accessible in the title screen after launching wesnoth using --clock option. It can be used as dialog template/example or as a place to test GUI2 code.
2024-06-06 16:33:37 +05:30
Subhraman Sarkar
5d06a8f463 putting into test textdomain so schema CI check can suceed 2024-05-27 19:41:31 +05:30
Wedge009
e3aeab3f27 Game version dialogue: Don't mark links for translation.
[ci skip]
2024-05-26 21:27:34 -04:00
Charles Dang
78620c7d61 GUI2/Addon Manager: make addon id more prominent, debug-only
It wasn't visible enough for people for whom it was useful, and too visible for people for whom it was not.
2024-05-26 18:18:11 -04:00
Subhraman Sarkar
da7e57422e
make sure bullets in about dialog use a font that has those character (#8921) 2024-05-26 11:29:07 +05:30
Steve Cotton
c2072f201d gui/language_selection: Rephrase text about becoming a translator
The link with details about individual compaigns is useful to players,
even if they aren't looking to become translators. So move it upwards.

The text about first-time players seemed confusing to me, as the choice
is already limited to languages that the player can read. Reworded it,
but after discussion in the PR, neither version was better than just
removing it.
2024-05-26 04:09:34 +02:00
Charles Dang
6c885c5db4 GUI2/Story Screen: only use area between images for Skip text 2024-05-25 02:45:42 -04:00
Charles Dang
310919b464 Fixup b548e7348d 2024-05-25 02:44:26 -04:00
Charles Dang
ebc3953e8b GUI2/Unit Create: increased list padding 2024-05-25 01:14:28 -04:00
Charles Dang
b548e7348d GUI2/Preferences: increased padding in hotkeys list 2024-05-25 01:14:15 -04:00
Charles Dang
91287d0fbf GUI2/Preferences: bumped max height slightly 2024-05-25 01:13:48 -04:00
Charles Dang
5e3a86f7ab GUI2/Game Load: refined design for the umpteenth time 2024-05-25 00:57:27 -04:00
Charles Dang
fb78528f2c GUI2/Story Viewer: fixed controls moving with long story sections 2024-05-25 00:48:20 -04:00
Charles Dang
4cb9df8e6c GUI2/Story Viewer: refine recent design updates, fix some layout issues 2024-05-25 00:26:11 -04:00
Subhraman Sarkar
9b38089db0
Story screen redesign (#8510) 2024-05-24 19:29:46 +05:30
Subhraman Sarkar
92d66554dd
UI : About dialog (#8803)
* Redesigned the version dialog to serve as a general purpose About dialog.

* Credits button removed from title screen

* Moved community dialog contents to about dialog as new tab

Co-Authored-By: Pentarctagon

* Bugfixes to the tab_container widget

* Success indication mechanism on copy buttons
2024-05-21 09:43:32 +05:30
Subhraman Sarkar
336226d198
bugfixes for unit type editor (#8846)
* bugfixes for unit type editor

1. accept space in unit type id
2. don't write translated string to generated wml
3. add textdomain at the top of the generated file
4. fix bad key in generated attack block
2024-05-12 14:41:28 +05:30
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