New macro for status boxes. Replaced replay ui toolbar image.

This commit is contained in:
fendrin 2013-11-19 00:22:53 +01:00
parent 1d216319bc
commit 77321c56c6

View file

@ -1,18 +1,161 @@
#textdomain wesnoth
#define STATUS_BOX X1 Y1 X2 Y2 ID REF XANCHOR YANCHOR
[panel]
id={ID}-box-topleft
image=themes/status_box/status_box-border-topleft.png
rect="{X1},{Y1},+3,+3"
xanchor={XANCHOR}
ref={REF}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-top
image=themes/status_box/status_box-border-top.png
rect="+0,=+0,{X2},+3"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-topright
image=themes/status_box/status_box-border-topright.png
rect="+0,=+0,+3,+3"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-left
image=themes/status_box/status_box-border-left.png
ref={ID}-box-topleft
rect="=+0,+0,+3,{Y2}"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-center
image=themes/status_box/status_box-background.png
rect="+0,=+0,{X2},{Y2}"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-right
image=themes/status_box/status_box-border-right.png
rect="+0,=+0,+3,{Y2}"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-botleft
image=themes/status_box/status_box-border-botleft.png
ref={ID}-box-left
rect="=+0,+0,+3,+3"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-bottom
image=themes/status_box/status_box-border-bottom.png
rect="+0,=+0,{X2},+3"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
[panel]
id={ID}-box-botright
image=themes/status_box/status_box-border-botright.png
rect="+0,=+0,+3,+3"
xanchor={XANCHOR}
yanchor={YANCHOR}
[/panel]
#enddef
#define REMOVE_STATUS_BOX ID
[remove]
id={ID}-box-topleft
[/remove]
[remove]
id={ID}-box-top
[/remove]
[remove]
id={ID}-box-topright
[/remove]
[remove]
id={ID}-box-left
[/remove]
[remove]
id={ID}-box-center
[/remove]
[remove]
id={ID}-box-right
[/remove]
[remove]
id={ID}-box-botleft
[/remove]
[remove]
id={ID}-box-bottom
[/remove]
[remove]
id={ID}-box-botright
[/remove]
#enddef
#define CHANGE_STATUS_BOX X1 Y1 X2 Y2 ID REF
[change]
id={ID}-box-topleft
rect="{X1},{Y1},+3,+3"
ref={REF}
[/change]
[change]
id={ID}-box-top
rect="+0,=+0,{X2},+3"
[/change]
[change]
id={ID}-box-topright
rect="+0,=+0,+3,+3"
[/change]
[change]
id={ID}-box-left
ref={ID}-box-topleft
rect="=+0,+0,+3,{Y2}"
[/change]
[change]
id={ID}-box-center
rect="+0,=+0,{X2},{Y2}"
[/change]
[change]
id={ID}-box-right
rect="+0,=+0,+3,{Y2}"
[/change]
[change]
id={ID}-box-botleft
ref={ID}-box-left
rect="=+0,+0,+3,+3"
[/change]
[change]
id={ID}-box-bottom
rect="+0,=+0,{X2},+3"
[/change]
[change]
id={ID}-box-botright
rect="+0,=+0,+3,+3"
[/change]
#enddef
#define COUNTDOWN_THEME
[panel]
id=timeout-panel
image=themes/status-bg.png
rect="+5,=,+90,="
xanchor=fixed
yanchor=fixed
[/panel]
{STATUS_BOX +5 =+0 +90 +15 timeout income-box-topright fixed fixed}
[label]
id=time-icon
#icon=themes/units.png
icon=themes/sand-clock.png
ref=timeout-panel
rect="=+5,=+1,+17,+17"
ref=timeout-box-center
rect="=+1,=-1,+17,+17"
xanchor=fixed
yanchor=fixed
[/label]
@ -38,9 +181,9 @@
[add]
[panel]
id=replay-panel
image=themes/top-bg.png
image=themes/editor/classic/toolbar.png
ref=top-panel
rect="=,+0,+882,+30"
rect="=,+0,+833,+41"
xanchor=left
yanchor=fixed
[/panel]