Skip to content

Commit

Permalink
GUI2: added code for minimal buttons (buttons sans background)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 22, 2016
1 parent e86cadf commit 386762a
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions data/gui/widget/button_25x25.cfg
Expand Up @@ -261,5 +261,95 @@
()
}

#
# Minimal-style buttons
# These buttons don't have a background, only the overlay
#

#define _GUI_RESOLUTION_MINIMAL RESOLUTION SIZE IMAGE
[resolution]

{RESOLUTION}

min_width = {SIZE}
min_height = {SIZE}

default_width = {SIZE}
default_height = {SIZE}

max_width = {SIZE}
max_height = {SIZE}

[state_enabled]

[draw]

[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + ".png"
[/image]

[/draw]

[/state_enabled]

[state_disabled]

[draw]

[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + ".png~GS()"
[/image]

[/draw]

[/state_disabled]

[state_pressed]

[draw]

[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + "-pressed.png"
[/image]

[/draw]

[/state_pressed]

[state_focused]

[draw]

[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + "-active.png"
[/image]

[/draw]

[/state_focused]

[/resolution]
#enddef

#define _GUI_DEFINITION_MINIMAL ID DESCRIPTION IMAGE
[button_definition]
id = {ID}
description = {DESCRIPTION}

{_GUI_RESOLUTION_MINIMAL () 25 ({IMAGE})}

[/button_definition]
#enddef

#undef _GUI_DEFINITION
#undef _GUI_DEFINITION_MINIMAL
#undef _GUI_RESOLUTION
#undef _GUI_RESOLUTION_MINIMAL

0 comments on commit 386762a

Please sign in to comment.