Improve the tiny-gui version.

This commit is contained in:
Mark de Wever 2010-01-03 10:38:32 +00:00
parent c16e777eb0
commit 3444c48e19

View file

@ -3,7 +3,7 @@
### Definition of the toggle panel for the wml_message.
###
#define _GUI__LISTBOX_SELECTED_CELL
#define _GUI__LISTBOX_SELECTED_CELL LINE_OFFSET_SIDE LINE_OFFSET_TOTAL LINE_HEIGHT BACKGROUND_OFFSET
# corners are 10x10
[image]
@ -13,70 +13,70 @@
[/image]
[image]
x = "(width - 10)"
x = "(width - {LINE_OFFSET_SIDE})"
y = 0
name = "misc/selection2_transparent-border-topright.png"
[/image]
[image]
x = 0
y = "(height - 10)"
y = "(height - {LINE_OFFSET_SIDE})"
name = "misc/selection2_transparent-border-botleft.png"
[/image]
[image]
x = "(width - 10)"
y = "(height - 10)"
x = "(width - {LINE_OFFSET_SIDE})"
y = "(height - {LINE_OFFSET_SIDE})"
name = "misc/selection2_transparent-border-botright.png"
[/image]
# since the lines are already quite long scale them instead of stretching
# the height of the lines is 3 pixels.
[image]
x = 10
x = {LINE_OFFSET_SIDE}
y = 0
w = "(if(width < 20, 0, width - 20))"
w = "(if(width < {LINE_OFFSET_TOTAL}, 0, width - {LINE_OFFSET_TOTAL}))"
name = "misc/selection2_transparent-border-top.png"
[/image]
[image]
x = 10
y = "(height - 3)"
w = "(if(width < 20, 0, width - 20))"
x = {LINE_OFFSET_SIDE}
y = "(height - {LINE_HEIGHT})"
w = "(if(width < {LINE_OFFSET_TOTAL}, 0, width - {LINE_OFFSET_TOTAL}))"
name = "misc/selection2_transparent-border-bottom.png"
[/image]
[image]
x = 0
y = 10
h = "(if(height < 20, 0, height - 20))"
y = {LINE_OFFSET_SIDE}
h = "(if(height < {LINE_OFFSET_TOTAL}, 0, height - {LINE_OFFSET_TOTAL}))"
name = "misc/selection2_transparent-border-left.png"
[/image]
[image]
x = "(width - 3)"
y = 10
h = "(if(height < 20, 0, height - 20))"
x = "(width - {LINE_HEIGHT})"
y = {LINE_OFFSET_SIDE}
h = "(if(height < {LINE_OFFSET_TOTAL}, 0, height - {LINE_OFFSET_TOTAL}))"
name = "misc/selection2_transparent-border-right.png"
[/image]
#main background 320 x 67
[image]
x = 3
y = 3
w = "(if(width < 6, 0, width - 6))"
h = "(if(height < 6, 0, height - 6))"
x = {LINE_HEIGHT}
y = {LINE_HEIGHT}
w = "(if(width < {BACKGROUND_OFFSET}, 0, width - {BACKGROUND_OFFSET}))"
h = "(if(height < {BACKGROUND_OFFSET}, 0, height - {BACKGROUND_OFFSET}))"
name = "misc/selection2_transparent-background.png"
[/image]
#enddef
[toggle_panel_definition]
id = "wml_message"
description = "Toggle panel for the wml_message."
#define _GUI_RESOLUTION RESOLUTION LINE_OFFSET_SIDE LINE_OFFSET_TOTAL LINE_HEIGHT BACKGROUND_OFFSET
[resolution]
{RESOLUTION}
min_width = 0
min_height = 0
@ -114,7 +114,7 @@
[state_enabled_selected]
[draw]
{_GUI__LISTBOX_SELECTED_CELL}
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET})}
[/draw]
[/state_enabled_selected]
@ -122,7 +122,7 @@
[state_disabled_selected]
[draw]
{_GUI__LISTBOX_SELECTED_CELL}
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET})}
[/draw]
[/state_disabled_selected]
@ -130,13 +130,23 @@
[state_focussed_selected]
[draw]
{_GUI__LISTBOX_SELECTED_CELL}
{_GUI__LISTBOX_SELECTED_CELL ({LINE_OFFSET_SIDE}) ({LINE_OFFSET_TOTAL}) ({LINE_HEIGHT}) ({BACKGROUND_OFFSET})}
[/draw]
[/state_focussed_selected]
[/resolution]
#enddef
[toggle_panel_definition]
id = "wml_message"
description = "Toggle panel for the wml_message."
{_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 5 10 1 2 }
{_GUI_RESOLUTION () 10 20 3 6 }
[/toggle_panel_definition]
#undef _GUI_RESOLUTION
#undef _GUI__LISTBOX_SELECTED_CELL