182 lines
2.7 KiB
INI
182 lines
2.7 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Definition of a toggle button with only a changing image.
|
|
### It's used for the editor in the resize grid. When needed it can also be
|
|
### extended for usage with other widgets.
|
|
###
|
|
|
|
#define _GUI_ICON SIZE
|
|
[image]
|
|
x = "((size / 2) - (image_width / 2) where size = {SIZE})"
|
|
y = "((size / 2) - (image_height / 2) where size = {SIZE})"
|
|
name = "(icon)"
|
|
[/image]
|
|
#enddef
|
|
|
|
#define _GUI_RESOLUTION RESOLUTION SIZE
|
|
[resolution]
|
|
|
|
{RESOLUTION}
|
|
|
|
min_width = {SIZE}
|
|
min_height = {SIZE}
|
|
|
|
default_width = {SIZE}
|
|
default_height = {SIZE}
|
|
|
|
max_width = {SIZE}
|
|
max_height = {SIZE}
|
|
|
|
text_extra_width = 0
|
|
text_font_size = 0
|
|
|
|
[state]
|
|
[enabled]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/enabled]
|
|
|
|
[disabled]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/disabled]
|
|
|
|
[focused]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30-active.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/focused]
|
|
[/state]
|
|
|
|
###
|
|
### Selected
|
|
###
|
|
|
|
[state]
|
|
[enabled]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30-pressed.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/enabled]
|
|
|
|
[disabled]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30-pressed.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/disabled]
|
|
|
|
[focused]
|
|
|
|
[draw]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
w = {SIZE}
|
|
h = {SIZE}
|
|
name = "buttons/button_square/button_square_30-active-pressed.png"
|
|
[/image]
|
|
|
|
{_GUI_ICON ({SIZE})}
|
|
|
|
[/draw]
|
|
|
|
[/focused]
|
|
[/state]
|
|
|
|
[/resolution]
|
|
|
|
#enddef
|
|
|
|
[toggle_button_definition]
|
|
|
|
id = "icon"
|
|
description = "This toggle button is meant to be used in the resize grid of the editor and only has an icon."
|
|
|
|
{_GUI_RESOLUTION ({GUI_NORMAL__RESOLUTION}) 30 }
|
|
|
|
[/toggle_button_definition]
|
|
|
|
[toggle_button_definition]
|
|
|
|
id = "icon_small"
|
|
description = "Small version of the icon-only toggle button."
|
|
|
|
{_GUI_RESOLUTION ({GUI_NORMAL__RESOLUTION}) 16 }
|
|
|
|
[/toggle_button_definition]
|
|
|
|
[toggle_button_definition]
|
|
|
|
id = "icon_tiny"
|
|
description = "Tiny version of the icon-only toggle button."
|
|
|
|
{_GUI_RESOLUTION ({GUI_NORMAL__RESOLUTION}) 10 }
|
|
|
|
[/toggle_button_definition]
|
|
|
|
#undef _GUI_RESOLUTION
|
|
#undef _GUI_ICON
|
|
|