Skip to content

Commit

Permalink
GUI2: removed pixel offset from GUI__TEXT_VERTICALLY_CENTRED
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed Dec 13, 2020
1 parent 3ae339b commit 17f979d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions data/gui/macros/_initial.cfg
Expand Up @@ -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]
Expand Down

0 comments on commit 17f979d

Please sign in to comment.