mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 21:48:35 +00:00

This is mainly about shifting WML macro inclusions into a where clause, especially when they appear multiple times in a specific formula.
158 lines
3.1 KiB
INI
158 lines
3.1 KiB
INI
#textdomain wesnoth-lib
|
|
###
|
|
### Definition of the toggle panel for the wml_message.
|
|
###
|
|
|
|
#define _GUI__LISTBOX_SELECTED_CELL LINE_OFFSET_SIDE LINE_OFFSET_TOTAL LINE_HEIGHT BACKGROUND_OFFSET IPF
|
|
|
|
# corners are 10x10
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
name = "dialogs/selection-border-topleft.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - {LINE_OFFSET_SIDE})"
|
|
y = 0
|
|
name = "dialogs/selection-border-topright.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = 0
|
|
y = "(height - {LINE_OFFSET_SIDE})"
|
|
name = "dialogs/selection-border-botleft.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - {LINE_OFFSET_SIDE})"
|
|
y = "(height - {LINE_OFFSET_SIDE})"
|
|
name = "dialogs/selection-border-botright.png{IPF}"
|
|
[/image]
|
|
|
|
# since the lines are already quite long scale them instead of stretching
|
|
# the height of the lines is 3 pixels.
|
|
[image]
|
|
x = {LINE_OFFSET_SIDE}
|
|
y = 0
|
|
w = "(if(width < offset, 0, width - offset) where offset = {LINE_OFFSET_TOTAL})"
|
|
name = "dialogs/selection-border-top.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = {LINE_OFFSET_SIDE}
|
|
y = "(height - {LINE_HEIGHT})"
|
|
w = "(if(width < offset, 0, width - offset) where offset = {LINE_OFFSET_TOTAL})"
|
|
name = "dialogs/selection-border-bottom.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = 0
|
|
y = {LINE_OFFSET_SIDE}
|
|
h = "(if(height < offset, 0, height - offset) where offset = {LINE_OFFSET_TOTAL})"
|
|
name = "dialogs/selection-border-left.png{IPF}"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - {LINE_HEIGHT})"
|
|
y = {LINE_OFFSET_SIDE}
|
|
h = "(if(height < offset, 0, height - offset) where offset = {LINE_OFFSET_TOTAL})"
|
|
name = "dialogs/selection-border-right.png{IPF}"
|
|
[/image]
|
|
|
|
#main background 320 x 67
|
|
[image]
|
|
x = {LINE_HEIGHT}
|
|
y = {LINE_HEIGHT}
|
|
w = "(if(width < offset, 0, width - offset) where offset = {BACKGROUND_OFFSET})"
|
|
h = "(if(height < offset, 0, height - offset) where offset = {BACKGROUND_OFFSET})"
|
|
name = "dialogs/selection-background.png{IPF}"
|
|
[/image]
|
|
|
|
#enddef
|
|
|
|
|
|
#define _GUI_RESOLUTION RESOLUTION LINE_OFFSET_SIDE LINE_OFFSET_TOTAL LINE_HEIGHT BACKGROUND_OFFSET
|
|
[resolution]
|
|
|
|
{RESOLUTION}
|
|
|
|
min_width = 0
|
|
min_height = 0
|
|
|
|
default_width = 0
|
|
default_height = 0
|
|
|
|
max_width = 0
|
|
max_height = 0
|
|
|
|
|
|
[state]
|
|
[enabled]
|
|
|
|
[draw]
|
|
[/draw]
|
|
|
|
[/enabled]
|
|
|
|
[disabled]
|
|
|
|
[draw]
|
|
[/draw]
|
|
|
|
[/disabled]
|
|
|
|
[focused]
|
|
|
|
[draw]
|
|
[/draw]
|
|
|
|
[/focused]
|
|
[/state]
|
|
|
|
###
|
|
### Selected
|
|
###
|
|
|
|
|
|
[state]
|
|
[enabled]
|
|
|
|
[draw]
|
|
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET}) ("~O(65%)")}
|
|
[/draw]
|
|
|
|
[/enabled]
|
|
|
|
[disabled]
|
|
|
|
[draw]
|
|
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET}) ("~O(65%)~GS()")}
|
|
[/draw]
|
|
|
|
[/disabled]
|
|
|
|
[focused]
|
|
|
|
[draw]
|
|
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET}) ("~O(65%)")}
|
|
[/draw]
|
|
|
|
[/focused]
|
|
[/state]
|
|
|
|
[/resolution]
|
|
#enddef
|
|
|
|
[toggle_panel_definition]
|
|
|
|
id = "wml_message"
|
|
description = "Toggle panel for the wml_message."
|
|
|
|
{_GUI_RESOLUTION () 10 20 3 6 }
|
|
|
|
[/toggle_panel_definition]
|
|
|
|
#undef _GUI_RESOLUTION
|
|
#undef _GUI__LISTBOX_SELECTED_CELL
|