Commit graph

67 commits

Author SHA1 Message Date
Subhraman Sarkar
72f1f0007c new definitions for label and new font size macros 2024-09-23 19:49:44 -04:00
Charles Dang
fc1409e2d1 MP/Staging, Join Game: improve sidebar layout 2024-09-18 16:09:07 -04:00
Celtic Minstrel
8dea67d323 Don't allow markup in achievement titles.
This is done as a guarantee that there will always be one unambiguous way to identify that the achievement is completed.
2023-05-06 14:45:40 -04: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
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
847b70ab4c gui2: Refactor widget frame code used for buttons and comboboxes 2021-03-26 04:27:18 -03:00
Iris Morelle
3cbe0a5ef7 gui2: Make GUI_LINE and GUI_POINT public macros
This detaches them from the GUI2 button definition.
2021-03-20 01:54:45 -03:00
Charles Dang
5f79d547fb GUI2: gave FILLER_ROW a grow factor of 0 2020-12-31 03:11:58 +11:00
Charles Dang
c65db9acbb GUI2: added _WIDGET_DEBUG_BORDER macro 2020-12-16 19:18:29 +11:00
Charles Dang
17f979d866 GUI2: removed pixel offset from GUI__TEXT_VERTICALLY_CENTRED
Fixes the text of menu_buttons being 1 pixel too high. Seems this is a relic from 2016 and me tweaking the
formula to try and get things more centered in buttons... But in that case, adjustments shuld probably be
directly made to buttons, not here.
2020-12-14 06:21:20 +11:00
Glen Whitney
acd08fd0c5 Scale fixed-size dialogue window capped by screen size percentage 2020-06-29 19:18:38 -04:00
Glen Whitney
8ba16c972a Scale buttons and toggle buttons with screen pitch also. 2020-05-26 16:20:52 -05:00
Glen Whitney
f3a472ab96 Modify GUI2 config files to scale font size with screen pixel pitch
These changes to the data/gui subdirectories make it so that above a certain
  screen pixel dimensions (currently 1200x900), text font sizes will be scaled
  with the pixel pitch of the SDL video device. In addition, several dialogues
  (such as the unit recall window, for example) are allowed to take on larger
  pixel dimensions to accommodate the larger (in pixel size) fonts.
2020-05-16 15:01:01 -05: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
95b4d4e0d7 Repair 66ab35f in the upwards direction
[ci skip]

(cherry picked from commit d724b1a71d)
2018-10-28 02:53:01 +00:00
Charles Dang
e2592c9d6a 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.

(cherry-picked from commit 7db83e3a0e)
2018-10-07 03:20:03 +00: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 db5abb7e63)
2018-10-07 03:18:19 +00:00
Charles Dang
d5227d8fab Added two missing textdomain headers
[ci skip]

Should fix two of the issues mentioned in 2709.

(cherry-picked from commit 8d1ec6216b)
2018-10-07 03:18:03 +00: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