Skip to content

Commit

Permalink
GUI2: fixed some overlay drawing issues with icon toggle buttons
Browse files Browse the repository at this point in the history
Not sure why, but in some cases the overlay calculations were getting screwed up. This makes them use
the general centered image macro, with accompanying fallback safety checks.
  • Loading branch information
Vultraz committed Jun 12, 2017
1 parent 325cf35 commit 0976ad8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions data/gui/widget/toggle_button_icon.cfg
Expand Up @@ -5,10 +5,10 @@
### extended for usage with other widgets.
###

#define _GUI_ICON SIZE
#define _GUI_ICON
[image]
x = "(size / 2 - image_width / 2 where size = {SIZE})"
y = "(size / 2 - image_height / 2 where size = {SIZE})"
{GUI_CENTERED_IMAGE}

name = "(icon)"
[/image]
#enddef
Expand Down Expand Up @@ -43,7 +43,7 @@
name = "buttons/button_square/button_square_30.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand All @@ -61,7 +61,7 @@
name = "buttons/button_square/button_square_30.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand All @@ -79,7 +79,7 @@
name = "buttons/button_square/button_square_30-active.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand All @@ -103,7 +103,7 @@
name = "buttons/button_square/button_square_30-pressed.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand All @@ -121,7 +121,7 @@
name = "buttons/button_square/button_square_30-pressed.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand All @@ -139,7 +139,7 @@
name = "buttons/button_square/button_square_30-active-pressed.png"
[/image]

{_GUI_ICON ({SIZE})}
{_GUI_ICON}

[/draw]

Expand Down

0 comments on commit 0976ad8

Please sign in to comment.