50 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
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
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
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 d724b1a71d67ffd45ad58654d3bd3a7fafdb6694)
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 7db83e3a0e5de45b3e64eb1da784a8ce334a49c6)
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 db5abb7e637fd87699fce49a9543faafc3f58068)
2018-10-07 03:18:19 +00: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
Jyrki Vesterinen
18e208e07c Revert "GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fixed_height keys"
This reverts commit 9f386ed563e84e355130a940be804d13bf5b3d9c.

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
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
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
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
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
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
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
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
Celtic Minstrel
f81169b7bb Draw a border around the lobby game list 2016-03-26 16:39:37 -04:00
Charles Dang
2f8f3af61b More design tweaks to windows and borders 2016-03-22 06:13:34 +11:00
Charles Dang
6304cca22a Moved data/gui/default to data/gui/ 2016-03-20 01:11:10 +11:00