Draw a border around the lobby game list
This commit is contained in:
parent
e7d82ebcad
commit
f81169b7bb
2 changed files with 77 additions and 37 deletions
|
@ -130,7 +130,47 @@
|
|||
|
||||
#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
|
||||
#
|
||||
# WIDTH Minimum width for the widget.
|
||||
|
@ -157,42 +197,40 @@
|
|||
definition = "default"
|
||||
|
||||
[stack]
|
||||
|
||||
[layer]
|
||||
|
||||
[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]
|
||||
|
||||
{GUI__WIDGET_FORCE_SIZE_LAYER {WIDTH} {HEIGHT}}
|
||||
{GUI__LAYER_GRID {WIDGET}}
|
||||
[/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]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
#enddef
|
||||
|
||||
#define GAMELISTBOX
|
||||
border = "left"
|
||||
border = "all"
|
||||
border_size = 5
|
||||
|
||||
[listbox]
|
||||
|
@ -794,7 +794,9 @@ border_size = 5
|
|||
[column]
|
||||
horizontal_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}
|
||||
)}
|
||||
[/column]
|
||||
|
|
Loading…
Add table
Reference in a new issue