Merge the up and down arrow in one file.

With some macros it can be made quite the same and easier to add more
buttons in the future. Also added a tiny gui version.
This commit is contained in:
Mark de Wever 2008-08-23 17:39:58 +00:00
parent 56c14b6372
commit 395b129ccd
3 changed files with 101 additions and 151 deletions

View file

@ -0,0 +1,101 @@
###
### Definition of buttons which have a 25 x 25 pixels image.
### - down arrow button for the listbox.
### - up arrow button for the listbox.
#define _GUI_RESOLUTION RESOLUTION SIZE IMAGE
[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} + "-disabled.png"
[/image]
[/draw]
[/state_disabled]
[state_pressed]
[draw]
[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + "-pressed.png"
[/image]
[/draw]
[/state_pressed]
[state_focussed]
[draw]
[image]
w = {SIZE}
h = {SIZE}
name = {IMAGE} + "-active.png"
[/image]
[/draw]
[/state_focussed]
[/resolution]
#enddef
#define _GUI_DEFINITION ID DESCRIPTION IMAGE
[button_definition]
id = {ID}
description = {DESCRIPTION}
{_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 12 ({IMAGE}) }
{_GUI_RESOLUTION () 25 ({IMAGE}) }
[/button_definition]
#enddef
{_GUI_DEFINITION
"down_arrow"
"Down arrow button for a scrollbar."
"buttons/downarrow-button"
}
{_GUI_DEFINITION
"up_arrow"
"Up arrow button for a scrollbar."
"buttons/uparrow-button"
}
#undef _GUI_DEFINITION
#undef _GUI_RESOLUTION

View file

@ -1,75 +0,0 @@
###
### Definition of a button with the down arrow image.
###
[button_definition]
id = "down_arrow"
description = "Down arrow button for a scrollbar."
[resolution]
min_width = 25
min_height = 25
default_width = 25
default_height = 25
max_width = 25
max_height = 25
text_extra_width = 0
text_extra_height = 0
text_font_size = 0
[state_enabled]
[draw]
[image]
name = "buttons/downarrow-button.png"
[/image]
[/draw]
[/state_enabled]
[state_disabled]
[draw]
[image]
name = "buttons/downarrow-button-disabled.png"
[/image]
[/draw]
[/state_disabled]
[state_pressed]
[draw]
[image]
name = "buttons/downarrow-button-pressed.png"
[/image]
[/draw]
[/state_pressed]
[state_focussed]
[draw]
[image]
name = "buttons/downarrow-button-active.png"
[/image]
[/draw]
[/state_focussed]
[/resolution]
[/button_definition]

View file

@ -1,76 +0,0 @@
###
### Definition of a button with the up arrow image.
###
[button_definition]
id = "up_arrow"
description = "Up arrow button for a scrollbar."
[resolution]
min_width = 25
min_height = 25
default_width = 25
default_height = 25
max_width = 25
max_height = 25
text_extra_width = 0
text_extra_height = 0
text_font_size = 0
[state_enabled]
[draw]
[image]
name = "buttons/uparrow-button.png"
[/image]
[/draw]
[/state_enabled]
[state_disabled]
[draw]
[image]
name = "buttons/uparrow-button-disabled.png"
[/image]
[/draw]
[/state_disabled]
[state_pressed]
[draw]
[image]
name = "buttons/uparrow-button-pressed.png"
[/image]
[/draw]
[/state_pressed]
[state_focussed]
[draw]
[image]
name = "buttons/uparrow-button-active.png"
[/image]
[/draw]
[/state_focussed]
[/resolution]
[/button_definition]