mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 20:03:51 +00:00
101 lines
1.7 KiB
INI
101 lines
1.7 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Experimental slider variant that does not have a text label since the
|
|
### default variant does have one that takes up more space than is strictly
|
|
### necessary and I (shadowm) can't deal with all the magic numbers in it.
|
|
###
|
|
|
|
#define _GUI_STATE IMAGE_SUFFIX GROOVE_COLOR
|
|
[draw]
|
|
|
|
#
|
|
# Groove
|
|
#
|
|
|
|
[line]
|
|
x1 = 0
|
|
y1 = "(height / 2)"
|
|
x2 = "(width - 2)"
|
|
y2 = "(height / 2)"
|
|
|
|
color = {GROOVE_COLOR}
|
|
thickness = 1
|
|
[/line]
|
|
|
|
#
|
|
# Slider
|
|
#
|
|
|
|
[image]
|
|
x = "(positioner_offset)"
|
|
y = "(if (image_height < height, (height - image_height) / 2, 0))"
|
|
name = "buttons/sliders/slider{IMAGE_SUFFIX}"
|
|
[/image]
|
|
|
|
[/draw]
|
|
#enddef
|
|
|
|
#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT POSITIONER_LENGTH
|
|
|
|
[resolution]
|
|
|
|
{RESOLUTION}
|
|
|
|
min_width = {MIN_WIDTH}
|
|
min_height = {HEIGHT}
|
|
|
|
default_width = {DEFAULT_WIDTH}
|
|
default_height = {HEIGHT}
|
|
|
|
max_width = 0
|
|
max_height = {HEIGHT}
|
|
|
|
minimum_positioner_length = {POSITIONER_LENGTH}
|
|
maximum_positioner_length = {POSITIONER_LENGTH}
|
|
|
|
right_offset = 2
|
|
|
|
#text_font_size = 1 # placeholder
|
|
|
|
[state_enabled]
|
|
{_GUI_STATE
|
|
".png"
|
|
({GUI__FONT_COLOR_ENABLED__DEFAULT})
|
|
}
|
|
[/state_enabled]
|
|
|
|
[state_disabled]
|
|
{_GUI_STATE
|
|
".png~GS()"
|
|
({GUI__FONT_COLOR_DISABLED__DEFAULT})
|
|
}
|
|
[/state_disabled]
|
|
|
|
[state_pressed]
|
|
{_GUI_STATE
|
|
"-pressed.png"
|
|
({GUI__FONT_COLOR_ENABLED__DEFAULT})
|
|
}
|
|
[/state_pressed]
|
|
|
|
[state_focused]
|
|
{_GUI_STATE
|
|
"-active.png"
|
|
({GUI__FONT_COLOR_ENABLED__DEFAULT})
|
|
}
|
|
[/state_focused]
|
|
|
|
[/resolution]
|
|
#enddef
|
|
|
|
[slider_definition]
|
|
id = "minimal"
|
|
description = "A slider without a value label."
|
|
|
|
{_GUI_RESOLUTION () 150 250 22 15 }
|
|
|
|
[/slider_definition]
|
|
|
|
#undef _GUI_STATE
|
|
#undef _GUI_RESOLUTION
|