Commit graph

53 commits

Author SHA1 Message Date
Charles Dang
e17b79cbee Repair 7db83e3 in the upwards direction
[ci skip]
2018-04-30 22:23:45 +11:00
Charles Dang
7db83e3a0e GUI2: removed unnecessary spaces and newlines from color macros
[ci skip]

Since these are usually used inline or as key values, we don't need the extra padding.
2018-04-30 22:20:40 +11:00
Charles Dang
db5abb7e63 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.
2018-03-26 12:11:34 +11:00
Charles Dang
8d1ec6216b Added two missing textdomain headers
[ci skip]

Should fix two of the issues mentioned in 2709.
2018-03-22 22:08:38 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Charles Dang
ca4b7dccff GUI2: removed excess spaces and newlines from font size macros
[ci skip]
2018-02-23 15:37:47 +11:00
Charles Dang
72a80fed5b Removed GUI_NORMAL__RESOLUTION macro
[ci skip]

Not necessary since the "tiny" resolution was removed a long time ago, and the parameters
would implicitly convert to 0 engine-side.
2018-02-17 17:33:32 +11:00
Charles Dang
ab2cfa0ac2 Fixup 002b1a3c87 (bad indent)
[ci skip]
2017-12-14 11:15:07 +11:00
Charles Dang
002b1a3c87 MP Staging/Join Game: unified player list handling and added player icons
Previously, MP Staging was using connect_engine::connected_users() to fill in the user list.
However, I noticed that the server was already sending the user list to all clients, including
the host, so I could unify the handling between Staging and Join Game by just using the server
data for both.

I've also added appropriate indicators for host, observer, and self in the list for both dialogs.
Additional host= and observer= status keys are sent by the server for that purpose.

I've also made the server dispatch the player list to the host when a game is created. This is
slightly redundant, since the host is the only player at that point, but it's easier than creating
a user config locally, or using connected_users(), not to mention easier to maintain.

The wesnothd::game::send_user_list function no longer exists early id `description_` is null.
No idea why it did that. It's not even used in the function. Anyway, it needed to be removed in
order for the above change to work.

Speaking of the host's copy of the player list, I haven't touched that. It's still needed for
managing things in the connect_engine. Might simplify things further in the future by delegating
more handling to the server, since it has a lot of the data needed already, but that's a different
project.
2017-12-14 11:12:49 +11:00
Jyrki Vesterinen
18e208e07c Revert "GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fixed_height keys"
This reverts commit 9f386ed563.

fixed_width/fixed_height are broken and completely fail to block the
widget from growing.
2017-11-15 19:04:03 +02:00
Charles Dang
9f386ed563 GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fixed_height keys
[ci skip]
2017-11-11 23:12:14 +11:00
Charles Dang
3d8dbde03b GUI2: strip trailing spaces from utility macros
[ci skip]
2017-07-26 22:13:13 +11:00
Charles Dang
bf60a0a209 Custom Options Tree: allow 'no mods' label to grow
[ci skip]

Allows it to fill all available space, especially on low resolutions.
2017-05-06 14:20:02 +11:00
Celtic Minstrel
4f3d7507e8 Prevent scrollbar in MP Create 1024x768 (usually)
A scrollbar can still sometimes appear for scenarios that have custom options.

[ci skip]
2017-05-05 23:03:56 -04:00
Charles Dang
4d23e8359e SP Options Configure: hide option tree toggle for this dialog
[ci skip]
2017-04-30 21:28:15 +11:00
Charles Dang
8b98e82b34 Added GUI_FILLER_ROW macro 2017-04-19 12:47:09 +11:00
Charles Dang
4f50559af9 GUI2 WML: consistent styling, don't use strings for bools 2017-04-16 17:19:03 +11:00
Charles Dang
e0751c1f54 GUI2: implement ability to set label alpha 2017-04-13 04:01:01 +11:00
Charles Dang
f0dffab55a Tree View Node: rename tree_view_node_icon to tree_view_node_toggle
This better reflect its function
2017-04-12 17:00:03 +11:00
Charles Dang
0a2ba65046 GUI2: simplify GUI_WINDOW_FIXED_SIZE_CENTERED x,y calc 2017-04-07 12:13:21 +11:00
Charles Dang
a0ff2a5e96 GUI2: made GUI_CENTERED_IMAGE more robust and deployed it for buttons instead of a custom macro 2017-04-07 12:11:09 +11:00
Charles Dang
18e29731e6 Add optional WIDTH and HEIGHT arguments to GUI_FILLER 2017-03-28 01:07:50 +11:00
Charles Dang
15b3317b36 Add optional ALPHA macro args to all color macros 2017-03-28 01:07:48 +11:00
Charles Dang
4e92eb1b55 Second small tweak to standard "gold" color (fixup faaa412d) 2017-03-14 11:10:42 +11:00
Charles Dang
faaa412dc5 Tweaked standard "gold" color to give it slightly more contrast 2017-03-13 01:50:33 +11:00
Charles Dang
93eb07ad8b Addon Manager/Addon List: center addon icon in available space 2017-03-10 18:07:39 +11:00
Charles Dang
e24336afeb GUI2: temporarily remove directional buttons from scrollbars
This is intended to be an experiment for the 1.13.7 release to see what players think.
2017-02-24 01:00:07 +11:00
Charles Dang
320e85d907 GUI2: renamed text size macros
[ci skip]
2016-12-17 00:45:01 +11:00
Jyrki Vesterinen
8f40462116 Size lock widget, the WML part 2016-11-15 22:41:48 +02:00
Charles Dang
06570d093e Removed 'draw outline around widget' stuff 2016-10-23 00:07:24 +11:00
Charles Dang
71bc3f356b Added GUI_WINDOW_FIXED_SIZE_CENTERED macro 2016-10-22 23:58:00 +11:00
Charles Dang
41672422a6 Colorize spacer lines 2016-10-21 02:43:39 +11:00
Ignacio R. Morelle
7531e7ef2e gui2/tslider: Improved color scheme for slider grooves
This makes it so the "selected" segment of the groove (towards the
slider origin) is drawn with a brighter color than the "empty" segment
(opposite from the origin). Since this obviously wouldn't work with
RGB #FFFFFF, and the color is too distracting anyway (it was pretty much
the only widget using the general *text* color), we now use the standard
UI border colors to match buttons, checkboxes and so on. This should
hopefully help with harmonizing Wesnoth's UI color scheme across the
board.

For this purpose we also introduce a macro for a darker/shaded disabled
text color, used for the unselected segment of disabled sliders.
2016-10-11 23:43:52 -03:00
Charles Dang
1f1855300d GUI2/Stacked Widget: removed [stack] wrapper around [layer] and use the latter directly
All dialog WML changes in this commit consist of removing [stack] tags and reducing subsequent subtag indent
by one layer.
2016-10-10 18:55:52 +11:00
Charles Dang
87f1f05677 MP Staging, MP Join Game: made side numbers really big 2016-10-06 21:22:19 +11:00
Charles Dang
fd53599f77 Moved custom_options_tree.cfg to a better location
Also fixed its linked_groups not being included in sp_options_configure.cfg
2016-09-02 10:18:38 +11:00
Charles Dang
1cfad2404f Simpler and safer GUI2 text positioning formulas 2016-07-28 23:01:35 +11:00
Charles Dang
95ab7971f8 Fixup GUI2 centered text formula 2016-07-28 21:52:48 +11:00
Charles Dang
2826881eef Bumped button text size by 1 point and fixed text centering. 2016-07-27 03:18:29 +11:00
Charles Dang
aea6cbbabc Tiny tweak to vertically centered text to make it more centered 2016-07-24 13:51:36 +11:00
Charles Dang
f32b10aa33 Fixed transparent scrollbar buttons 2016-05-13 18:45:42 +11:00
Charles Dang
eb943e57af Reapplied blur effect to [message]s 2016-05-13 18:30:09 +11:00
Charles Dang
344955e4c1 GUI2: added macro for vertical spacer line 2016-04-10 06:57:27 +11:00
Charles Dang
47bb358003 GUI2: removed extra + 2 offset from GUI__TEXT_VERTICALLY_CENTRED 2016-04-10 06:48:17 +11:00
Charles Dang
9cc4834070 GUI2: converted horizontal scrollbars to new style 2016-04-09 01:03:40 +11:00
Celtic Minstrel
7521fad2a1 Merge pull request #639 from ancestral-lato
New default game typeface: Lato
2016-04-06 13:43:15 -04:00
Celtic Minstrel
21965b40e5 Font scaling minimum to 80% and adjust vertical centering formula
[ci skip]
2016-04-06 13:31:38 -04:00
Charles Dang
0708069cc2 New design for vertical scrollbars (horizontal pending) 2016-04-03 23:32:04 +11:00
ancestral
280c5fe69a Minor formatting change to _initial.cfg
Added font files for Lato, and SIL OFL license
2016-03-30 02:01:13 -05:00
ancestral
353a9c38e7 Lato is now the new game font. Initially, this will be limited to GUI2, but as tech is updated in the project, we hope to make Lato the new default everywhere in the game. 2016-03-30 01:46:02 -05:00