mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 16:22:08 +00:00
306 lines
6.3 KiB
INI
306 lines
6.3 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Definition of the default button.
|
|
###
|
|
|
|
#define _GUI_BUTTON_FONT_SIZE
|
|
16 #enddef
|
|
|
|
#define _GUI_LINE X1 Y1 X2 Y2 COLOR
|
|
[line]
|
|
x1 = {X1}
|
|
y1 = {Y1}
|
|
x2 = {X2}
|
|
y2 = {Y2}
|
|
|
|
thickness = 1
|
|
color = {COLOR}
|
|
[/line]
|
|
#enddef
|
|
|
|
#define _GUI_POINT X Y COLOR
|
|
{_GUI_LINE {X} {Y} {X} {Y} {COLOR}}
|
|
#enddef
|
|
|
|
#define _GUI_STATE BACKGROUND_IMAGE BORDER_COLOR BORDER_COLOR_DARK HIGHLIGHT_LINE_COLOR IPF
|
|
#
|
|
# Background
|
|
#
|
|
|
|
[image]
|
|
x = 2
|
|
y = 2
|
|
w = "(width)"
|
|
h = "(height)"
|
|
name = "buttons/button_normal/{BACKGROUND_IMAGE}.png{IPF}"
|
|
[/image]
|
|
|
|
#
|
|
# Dark background borders
|
|
#
|
|
|
|
{_GUI_LINE 0 1 0 "(height - 2)" "1, 10, 16, 255"}
|
|
{_GUI_LINE 2 1 "(width - 2)" 1 "1, 10, 16, 255"}
|
|
{_GUI_LINE 1 "(height - 1)" "(width - 2)" "(height - 1)" "1, 10, 16, 255"}
|
|
{_GUI_LINE "(width - 2)" 1 "(width - 2)" "(height - 1)" "1, 10, 16, 255"}
|
|
|
|
#
|
|
# Gold colored borders
|
|
#
|
|
|
|
{_GUI_LINE 2 0 "(width - 2)" 0 {BORDER_COLOR}}
|
|
{_GUI_LINE "(width - 1)" 1 "(width - 1)" "(height - 3)" {BORDER_COLOR}}
|
|
|
|
{_GUI_LINE 1 1 1 "(height - 3)" {BORDER_COLOR_DARK}}
|
|
{_GUI_LINE 2 "(height - 2)" "(width - 2)" "(height - 2)" {BORDER_COLOR_DARK}}
|
|
|
|
#
|
|
# Blue tint lines on the top and right
|
|
#
|
|
|
|
{_GUI_LINE 3 2 "(width - 3)" 2 {HIGHLIGHT_LINE_COLOR}}
|
|
{_GUI_LINE "(width - 3)" 2 "(width - 3)" "(height - 4)" {HIGHLIGHT_LINE_COLOR}}
|
|
|
|
#
|
|
# Round the corners
|
|
#
|
|
|
|
{_GUI_POINT 2 1 {BORDER_COLOR_DARK}}
|
|
{_GUI_POINT 2 "(height - 3)" {BORDER_COLOR_DARK}}
|
|
|
|
{_GUI_POINT "(width - 2)" 1 {BORDER_COLOR}}
|
|
{_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"
|
|
({GUI__FONT_COLOR_DISABLED__DEFAULT ALPHA={ALPHA}})
|
|
("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_BUTTON_FONT_SIZE}) () 255}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "large"
|
|
description = "Large button"
|
|
|
|
{_GUI_RESOLUTION () 40 116 30 13 4 ({_GUI_BUTTON_FONT_SIZE}) () 255}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "really_large"
|
|
description = "Large button"
|
|
|
|
{_GUI_RESOLUTION () 40 172 40 13 4 ({GUI_FONT_SIZE_LARGE}) () 255}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "transparent"
|
|
description = "Default transparent button"
|
|
|
|
{_GUI_RESOLUTION () 40 112 26 13 4 ({_GUI_BUTTON_FONT_SIZE}) "~O(65%)" 165}
|
|
|
|
[/button_definition]
|
|
|
|
#define _GUI_RESOLUTION_ICON_ONLY RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE IPF ALPHA IMAGE_OVERLAY
|
|
[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}}
|
|
|
|
[image]
|
|
{GUI_CENTERED_IMAGE}
|
|
|
|
name = {IMAGE_OVERLAY} + ".png{IPF}"
|
|
[/image]
|
|
|
|
[/draw]
|
|
|
|
[/state_enabled]
|
|
|
|
[state_disabled]
|
|
|
|
[draw]
|
|
|
|
{_GUI_STATE "background"
|
|
({GUI__FONT_COLOR_DISABLED__DEFAULT ALPHA={ALPHA}})
|
|
("89, 89, 89, {ALPHA}")
|
|
("1, 10, 16, 255") "~GS(){IPF}"}
|
|
|
|
[image]
|
|
{GUI_CENTERED_IMAGE}
|
|
|
|
name = {IMAGE_OVERLAY} + ".png~GS(){IPF}"
|
|
[/image]
|
|
|
|
[/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}}
|
|
|
|
[image]
|
|
{GUI_CENTERED_IMAGE}
|
|
|
|
name = {IMAGE_OVERLAY} + "-pressed.png{IPF}"
|
|
[/image]
|
|
|
|
[/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}}
|
|
|
|
[image]
|
|
{GUI_CENTERED_IMAGE}
|
|
|
|
name = {IMAGE_OVERLAY} + "-active.png{IPF}"
|
|
[/image]
|
|
|
|
[/draw]
|
|
|
|
[/state_focused]
|
|
|
|
[/resolution]
|
|
#enddef
|
|
|
|
[button_definition]
|
|
|
|
id = "left_arrow_ornate"
|
|
description = "Left arrow button."
|
|
|
|
{_GUI_RESOLUTION_ICON_ONLY () 40 56 26 13 4 ({_GUI_BUTTON_FONT_SIZE}) () 255 ("icons/arrows/long_arrow_ornate_left")}
|
|
|
|
[/button_definition]
|
|
|
|
[button_definition]
|
|
|
|
id = "right_arrow_ornate"
|
|
description = "Right arrow button."
|
|
|
|
{_GUI_RESOLUTION_ICON_ONLY () 40 56 26 13 4 ({_GUI_BUTTON_FONT_SIZE}) () 255 ("icons/arrows/long_arrow_ornate_right")}
|
|
|
|
[/button_definition]
|
|
|
|
#undef _GUI_POINT
|
|
#undef _GUI_LINE
|
|
#undef _GUI_STATE
|
|
#undef _GUI_RESOLUTION
|
|
#undef _GUI_RESOLUTION_ICON_ONLY
|