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.
This commit is contained in:
Charles Dang 2020-12-14 06:21:20 +11:00
parent 3ae339bf31
commit 17f979d866

View file

@ -21,16 +21,14 @@
# If the text is too wide it returns the left side.
# Rounding happens to the left side.
#define GUI__TEXT_HORIZONTALLY_CENTRED
"(max((width - text_width) / 2, 0))"
#enddef
"(max((width - text_width) / 2, 0))" #enddef
# Centers the text vertically.
#
# If the text is too high it returns the top side.
# Rounding happens to the bottom side.
#define GUI__TEXT_VERTICALLY_CENTRED
"(max((height - text_height - 2) / 2, 0))"
#enddef
"(max((height - text_height) / 2, 0))" #enddef
#define GUI__CENTERED_TEXT FONT_SIZE FONT_STYLE FONT_COLOR
[text]