10 Commits

Author SHA1 Message Date
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
d53ca602b8 gui2: Reclaim vertical real estate from some Search boxes
Several dialogs have Search boxes accompanying a central element, with
the boxes taking up a whole row of their own. For both aesthetic and
space allocation purposes it turns out to be more convenient to relocate
these boxes to the top right corner of the dialog to share room with the
dialog's caption.

This only applies to the Campaigns menu, Load Game, Create Unit, and
Recall Unit dialogs. The Recruit Unit dialog, interestingly enough,
already used this approach (an accident?).

Chat Log and the Add-ons Manager *could*, in theory, use this same
change, but they are a bit trickier because of the additional controls
attached to the Search box -- especially so in the Add-ons Manager's
case.

[ci skip]
2019-11-04 20:35:03 -03:00
Charles Dang
05ab79fae3 GUI2: fixed typo in macro name (pointed out in #3847)
[ci skip]
2019-01-18 10:56:04 +11:00
Charles Dang
e0b35791e2 GUI2/Text Box: refactored hint text interface
Previously, I had implemented the hint text ("Search)" and image (the magnifying glass)
as a custom text box definition. This caused some problems, though. Since the string was
hard-coded as part of a WFL formula, it couldn't be translated (see #2709 and #2732). It
also wasn't expandable to any other usecase.

Instead, I've added two new hint_text= and hint_image= keys to [text_box], wrapped the
"Search" text and magnifying image path in a helper macro, and refactored the default
definition to display the hint text and image when appropriate.

This also fixes a minor issue where selected text wouldn't remain highlighted when the
box wasn't focused when using the filter definition (it did with the default one).

This should fix the untranslatable "Search" text issue mentioned in both issues above.
The new string is in the wesnoth-lib textdomain.

(cherry-picked from commit db5abb7e637fd87699fce49a9543faafc3f58068)
2018-10-07 03:18:19 +00:00
Charles Dang
4f50559af9 GUI2 WML: consistent styling, don't use strings for bools 2017-04-16 17:19:03 +11:00
Charles Dang
0fc5ab92a3 GUI2: added a background for filter text boxes instead of using a 'Filter' label
[ci skip]
2016-12-17 00:45:00 +11:00
Charles Dang
da5ca8efce GUI2: bunch of small internal layout tweaks to dialogs using unit preview panes
These should have littke to no obvious effect, except if one of these dialogs is made fixed-size or
extra space becomes available for some reason.
2016-11-05 19:53:06 +11:00
Charles Dang
6304cca22a Moved data/gui/default to data/gui/ 2016-03-20 01:11:10 +11:00