GUI2: added code for minimal buttons (buttons sans background)

This commit is contained in:
Charles Dang 2016-03-23 07:49:11 +11:00
parent e86cadfa72
commit 386762a6f2

View file

@ -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