wesnoth/data/gui/widget/vertical_scrollbar_default.cfg
2016-05-13 18:45:42 +11:00

112 lines
2.2 KiB
INI

#textdomain wesnoth-lib
###
### Definition of a vertical scrollbar.
###
#define _GUI_STATE POSITIONER_TOP IMAGE_SUFFIX IPF
[draw]
#
# Groove
#
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"
fill_color = "4, 4, 4, 255"
[/rectangle]
#
# Positioner
#
[image]
# 5 pixels high
x = 0
y = "(positioner_offset)"
name = "buttons/scrollbars/scrolltop{IMAGE_SUFFIX}{IPF}"
[/image]
[image]
x = 0
y = "(positioner_offset + {POSITIONER_TOP})"
h = "(
if(positioner_length - {POSITIONER_TOP} < 0
, 0, positioner_length - {POSITIONER_TOP}))"
resize_mode = "stretch"
name = "buttons/scrollbars/scrollmid{IMAGE_SUFFIX}{IPF}"
[/image]
[image]
# 5 pixels high
x = 0
y = "(positioner_offset + positioner_length)"
name = "buttons/scrollbars/scrollbottom{IMAGE_SUFFIX}{IPF}"
[/image]
[/draw]
#enddef
#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT POSITIONER_LENGHT POSITIONER_TOP IPF
[resolution]
{RESOLUTION}
min_width = {WIDTH}
min_height = {HEIGHT}
default_width = 15
default_height = {HEIGHT}
max_width = {WIDTH}
max_height = 0
minimum_positioner_length = {POSITIONER_LENGHT}
top_offset = 0
bottom_offset = 0
[state_enabled]
{_GUI_STATE ({POSITIONER_TOP}) ".png" ({IPF}) }
[/state_enabled]
[state_disabled]
{_GUI_STATE ({POSITIONER_TOP}) ".png~GS()" ({IPF}) }
[/state_disabled]
[state_pressed]
{_GUI_STATE ({POSITIONER_TOP}) "-pressed.png" ({IPF}) }
[/state_pressed]
[state_focused]
{_GUI_STATE ({POSITIONER_TOP}) "-active.png" ({IPF}) }
[/state_focused]
[/resolution]
#enddef
[vertical_scrollbar_definition]
id = "default"
description = "a vertical scrollbar"
# Note a scrollbar is normally sized by the item that "masters" it
# that's why the default height is rather low.
{_GUI_RESOLUTION () 25 20 11 2 ()}
[/vertical_scrollbar_definition]
[vertical_scrollbar_definition]
id = "transparent"
description = "a transparent vertical scrollbar"
# Note a scrollbar is normally sized by the item that "masters" it
# that's why the default height is rather low.
{_GUI_RESOLUTION () 25 20 11 2 "~O(65%)"}
[/vertical_scrollbar_definition]
#undef _GUI_STATE
#undef _GUI_RESOLUTION