mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 17:25:32 +00:00
229 lines
4.3 KiB
INI
229 lines
4.3 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Definition of the default button.
|
|
###
|
|
|
|
#define _GUI_BORDER_COLOR_ALPHA ALPHA
|
|
"162, 127, 68, {ALPHA}" #enddef
|
|
|
|
#define _GUI_BORDER_COLOR_DARK_ALPHA ALPHA
|
|
"114, 79, 46, {ALPHA}" #enddef
|
|
|
|
#define _GUI_POINT X Y COLOR
|
|
[line]
|
|
x1 = {X}
|
|
y1 = {Y}
|
|
x2 = {X}
|
|
y2 = {Y}
|
|
|
|
thickness = 1
|
|
color = {COLOR}
|
|
[/line]
|
|
#enddef
|
|
|
|
#define _GUI_STATE BACKGROUND_IMAGE BORDER_COLOR BORDER_COLOR_DARK HIGHLIGHT_LINE_COLOR IPF
|
|
[image]
|
|
w = "(width)"
|
|
h = "(height)"
|
|
name = "buttons/button_normal/{BACKGROUND_IMAGE}.png{IPF}"
|
|
[/image]
|
|
|
|
[rectangle]
|
|
x = 0
|
|
y = 0
|
|
w = "(width)"
|
|
h = "(height)"
|
|
|
|
border_thickness = 3
|
|
border_color = "1, 10, 16, 255"
|
|
[/rectangle]
|
|
|
|
[rectangle]
|
|
x = 1
|
|
y = 0
|
|
w = "(width - 1)"
|
|
h = "(height - 1)"
|
|
|
|
border_thickness = 1
|
|
border_color = {BORDER_COLOR}
|
|
[/rectangle]
|
|
|
|
#
|
|
# Darken borders along the left and bottom
|
|
#
|
|
|
|
[line]
|
|
x1 = 1
|
|
y1 = 1
|
|
x2 = 1
|
|
y2 = "(height - 2)"
|
|
|
|
thickness = 1
|
|
color = {BORDER_COLOR_DARK}
|
|
[/line]
|
|
|
|
[line]
|
|
x1 = 1
|
|
y1 = "(height - 2)"
|
|
x2 = "(width - 2)"
|
|
y2 = "(height - 2)"
|
|
|
|
thickness = 1
|
|
color = {BORDER_COLOR_DARK}
|
|
[/line]
|
|
|
|
#
|
|
# Tint lines on the top and right
|
|
#
|
|
|
|
[line]
|
|
x1 = 3
|
|
y1 = 2
|
|
x2 = "(width - 3)"
|
|
y2 = 2
|
|
|
|
thickness = 1
|
|
color = {HIGHLIGHT_LINE_COLOR}
|
|
[/line]
|
|
|
|
[line]
|
|
x1 = "(width - 3)"
|
|
y1 = 2
|
|
x2 = "(width - 3)"
|
|
y2 = "(height - 4)"
|
|
|
|
thickness = 1
|
|
color = {HIGHLIGHT_LINE_COLOR}
|
|
[/line]
|
|
|
|
#
|
|
# Round the corners
|
|
#
|
|
|
|
{_GUI_POINT 0 0 ("0, 0, 0, 0")}
|
|
{_GUI_POINT 1 0 ("0, 0, 0, 0")}
|
|
{_GUI_POINT 2 1 {BORDER_COLOR_DARK}}
|
|
|
|
{_GUI_POINT 0 "(height - 1)" ("0, 0, 0, 0")}
|
|
{_GUI_POINT 1 "(height - 2)" ("0, 0, 0, 0")}
|
|
{_GUI_POINT 2 "(height - 3)" {BORDER_COLOR_DARK}}
|
|
|
|
{_GUI_POINT "(width - 1)" 0 ("0, 0, 0, 0")}
|
|
{_GUI_POINT "(width - 2)" 1 {BORDER_COLOR}}
|
|
|
|
{_GUI_POINT "(width - 1)" "(height - 1)" ("0, 0, 0, 0")}
|
|
{_GUI_POINT "(width - 1)" "(height - 2)" ("0, 0, 0, 0")}
|
|
{_GUI_POINT "(width - 2)" "(height - 3)" {BORDER_COLOR}}
|
|
#enddef
|
|
|
|
#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE IPF ALPHA
|
|
[resolution]
|
|
|
|
{RESOLUTION}
|
|
|
|
min_width = {MIN_WIDTH}
|
|
min_height = {HEIGHT}
|
|
|
|
default_width = {DEFAULT_WIDTH}
|
|
default_height = {HEIGHT}
|
|
|
|
max_width = 0
|
|
max_height = {HEIGHT}
|
|
|
|
text_extra_width = {EXTRA_WIDTH}
|
|
text_extra_height = {EXTRA_HEIGHT}
|
|
text_font_size = {FONT_SIZE}
|
|
|
|
[state_enabled]
|
|
|
|
[draw]
|
|
|
|
{_GUI_STATE "background"
|
|
({_GUI_BORDER_COLOR_ALPHA {ALPHA}})
|
|
({_GUI_BORDER_COLOR_DARK_ALPHA {ALPHA}}) ("21, 79, 109, 255") {IPF}}
|
|
|
|
{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
|
|
|
|
[/draw]
|
|
|
|
[/state_enabled]
|
|
|
|
[state_disabled]
|
|
|
|
[draw]
|
|
|
|
{_GUI_STATE "background"
|
|
("128, 128, 128, {ALPHA}") # Same as GUI__FONT_COLOR_DISABLED__DEFAULT, but with an alpha componant
|
|
("89, 89, 89, {ALPHA}")
|
|
("1, 10, 16, 255") "~GS(){IPF}"}
|
|
|
|
{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_DISABLED__TITLE})}
|
|
|
|
[/draw]
|
|
|
|
[/state_disabled]
|
|
|
|
[state_pressed]
|
|
|
|
[draw]
|
|
|
|
{_GUI_STATE "background-pressed"
|
|
({_GUI_BORDER_COLOR_ALPHA {ALPHA}})
|
|
({_GUI_BORDER_COLOR_DARK_ALPHA {ALPHA}}) ("1, 10, 16, 255") {IPF}}
|
|
|
|
{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
|
|
|
|
[/draw]
|
|
|
|
[/state_pressed]
|
|
|
|
[state_focused]
|
|
|
|
[draw]
|
|
|
|
{_GUI_STATE "background-active"
|
|
({_GUI_BORDER_COLOR_ALPHA {ALPHA}})
|
|
({_GUI_BORDER_COLOR_DARK_ALPHA {ALPHA}}) ("12, 108, 157, 255") {IPF}}
|
|
|
|
{GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}
|
|
|
|
[/draw]
|
|
|
|
[/state_focused]
|
|
|
|
[/resolution]
|
|
#enddef
|
|
|
|
[button_definition]
|
|
|
|
id = "default"
|
|
description = "Default button"
|
|
|
|
{_GUI_RESOLUTION () 40 112 26 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) () 255}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "large"
|
|
description = "Large button"
|
|
|
|
{_GUI_RESOLUTION () 40 116 30 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) () 255}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "transparent"
|
|
description = "Default transparent button"
|
|
|
|
{_GUI_RESOLUTION () 40 112 26 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "~O(65%)" 165}
|
|
|
|
[/button_definition]
|
|
|
|
#undef _GUI_BORDER_COLOR_ALPHA
|
|
#undef _GUI_BORDER_COLOR_DARK_ALPHA
|
|
#undef _GUI_POINT
|
|
#undef _GUI_STATE
|
|
#undef _GUI_RESOLUTION
|