mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 20:27:38 +00:00
Draw a border around the lobby game list
This commit is contained in:
parent
e7d82ebcad
commit
f81169b7bb
@ -130,7 +130,47 @@
|
|||||||
|
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Forces a wiget to be of a certain size.
|
#define GUI__LAYER_GRID WIDGET
|
||||||
|
[layer]
|
||||||
|
[row]
|
||||||
|
grow_factor = 1
|
||||||
|
[column]
|
||||||
|
grow_factor = 1
|
||||||
|
horizontal_grow = "true"
|
||||||
|
vertical_grow = "true"
|
||||||
|
{WIDGET}
|
||||||
|
[/column]
|
||||||
|
[/row]
|
||||||
|
[/layer]
|
||||||
|
#enddef
|
||||||
|
#define GUI__WIDGET_BORDER_LAYER MARGIN THICKNESS COLOR
|
||||||
|
{GUI__LAYER_GRID (
|
||||||
|
[drawing]
|
||||||
|
[draw]
|
||||||
|
[rectangle]
|
||||||
|
x = 0
|
||||||
|
y = 0
|
||||||
|
w = "(width-4)"
|
||||||
|
h = "(height-4)"
|
||||||
|
|
||||||
|
border_thickness = 1
|
||||||
|
border_color = {COLOR}
|
||||||
|
[/rectangle]
|
||||||
|
[/draw]
|
||||||
|
[/drawing]
|
||||||
|
)}
|
||||||
|
#enddef
|
||||||
|
#define GUI__WIDGET_FORCE_SIZE_LAYER WIDTH HEIGHT
|
||||||
|
{GUI__LAYER_GRID (
|
||||||
|
[spacer]
|
||||||
|
definition = "default"
|
||||||
|
width = "{WIDTH}"
|
||||||
|
height = "{HEIGHT}"
|
||||||
|
[/spacer]
|
||||||
|
)}
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
# Forces a widget to be of a certain size.
|
||||||
# Depending of the flags of the parent widget the item will grow
|
# Depending of the flags of the parent widget the item will grow
|
||||||
#
|
#
|
||||||
# WIDTH Minimum width for the widget.
|
# WIDTH Minimum width for the widget.
|
||||||
@ -157,42 +197,40 @@
|
|||||||
definition = "default"
|
definition = "default"
|
||||||
|
|
||||||
[stack]
|
[stack]
|
||||||
|
{GUI__WIDGET_FORCE_SIZE_LAYER {WIDTH} {HEIGHT}}
|
||||||
[layer]
|
{GUI__LAYER_GRID {WIDGET}}
|
||||||
|
|
||||||
[row]
|
|
||||||
|
|
||||||
[column]
|
|
||||||
|
|
||||||
[spacer]
|
|
||||||
definition = "default"
|
|
||||||
width = "{WIDTH}"
|
|
||||||
height = "{HEIGHT}"
|
|
||||||
[/spacer]
|
|
||||||
|
|
||||||
[/column]
|
|
||||||
|
|
||||||
[/row]
|
|
||||||
|
|
||||||
[/layer]
|
|
||||||
|
|
||||||
[layer]
|
|
||||||
|
|
||||||
[row]
|
|
||||||
grow_factor = 1
|
|
||||||
[column]
|
|
||||||
grow_factor = 1
|
|
||||||
horizontal_grow = "true"
|
|
||||||
vertical_grow = "true"
|
|
||||||
{WIDGET}
|
|
||||||
[/column]
|
|
||||||
|
|
||||||
[/row]
|
|
||||||
|
|
||||||
[/layer]
|
|
||||||
|
|
||||||
[/stack]
|
[/stack]
|
||||||
|
[/stacked_widget]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
# Draws a border around a widget.
|
||||||
|
# Depending on the flags of the parent widget, the item will grow
|
||||||
|
#
|
||||||
|
# MARGIN The border size of the grid's column
|
||||||
|
# THICKNESS The thickness of the border.
|
||||||
|
# COLOR The border's color.
|
||||||
|
# WIDGET The widget to add into the item.
|
||||||
|
#define GUI_OUTLINED_WIDGET MARGIN THICKNESS COLOR WIDGET
|
||||||
|
[stacked_widget]
|
||||||
|
definition = "default"
|
||||||
|
|
||||||
|
[stack]
|
||||||
|
{GUI__WIDGET_BORDER_LAYER {MARGIN} {THICKNESS} {COLOR}}
|
||||||
|
{GUI__LAYER_GRID {WIDGET}}
|
||||||
|
[/stack]
|
||||||
|
[/stacked_widget]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
# Combines GUI_FORCE_WIDGET_MINIMUM_SIZE and GUI_OUTLINED_WIDGET
|
||||||
|
#define GUI_FORCE_OUTLINED_WIDGET_MINIMUM_SIZE WIDTH HEIGHT MARGIN THICKNESS COLOR WIDGET
|
||||||
|
[stacked_widget]
|
||||||
|
definition = "default"
|
||||||
|
|
||||||
|
[stack]
|
||||||
|
{GUI__WIDGET_FORCE_SIZE_LAYER {WIDTH} {HEIGHT}}
|
||||||
|
{GUI__WIDGET_BORDER_LAYER {MARGIN} {THICKNESS} {COLOR}}
|
||||||
|
{GUI__LAYER_GRID {WIDGET}}
|
||||||
|
[/stack]
|
||||||
[/stacked_widget]
|
[/stacked_widget]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define GAMELISTBOX
|
#define GAMELISTBOX
|
||||||
border = "left"
|
border = "all"
|
||||||
border_size = 5
|
border_size = 5
|
||||||
|
|
||||||
[listbox]
|
[listbox]
|
||||||
@ -794,7 +794,9 @@ border_size = 5
|
|||||||
[column]
|
[column]
|
||||||
horizontal_grow = "true"
|
horizontal_grow = "true"
|
||||||
vertical_grow = "true"
|
vertical_grow = "true"
|
||||||
{GUI_FORCE_WIDGET_MINIMUM_SIZE 0 "((screen_height * 30) / 100)" (
|
{GUI_FORCE_OUTLINED_WIDGET_MINIMUM_SIZE
|
||||||
|
0 "((screen_height * 30) / 100)"
|
||||||
|
5 1 {GUI__BORDER_COLOR_BRIGHT} (
|
||||||
{GAMELISTBOX}
|
{GAMELISTBOX}
|
||||||
)}
|
)}
|
||||||
[/column]
|
[/column]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user