WIP refactoring of the lobby main.

The refactoring should make the code more transparent and clear. Still
WIP but committing so ilor can work on the code without the risk of
merging problems.
This commit is contained in:
Mark de Wever 2009-07-13 20:13:51 +00:00
parent 47c10cf158
commit 6e9c871369

View file

@ -213,7 +213,6 @@
[header]
[row]
[column]
grow_factor = 1
horizontal_grow = "true"
border = "all"
border_size = 5
@ -228,7 +227,6 @@
[list_definition]
[row]
[column]
vertical_grow = "true"
horizontal_grow = "true"
[toggle_panel]
definition = "default"
@ -349,6 +347,68 @@
[/multi_page]
#enddef
#define _GUI_TITLE
border = "all"
border_size = 5
[label]
definition = "title"
label = _ "Multiplayer Lobby"
[/label]
#enddef
#define _GUI_CONTROL_AREA
{HORIZONTAL_BEGIN}
[button]
id = "quit"
definition = "default"
label = _ "Quit"
[/button]
{VERTICAL_SEP}
[button]
id = "show_preferences"
definition = "default"
label = _ "Preferences"
[/button]
{VERTICAL_SEP}
[button]
id = "refresh"
definition = "default"
label = _ "Refresh"
[/button]
{VERTICAL_SEP}
[button]
id = "join_global"
definition = "default"
label = _ "Join"
[/button]
{VERTICAL_SEP}
[button]
id = "observe_global"
definition = "default"
label = _ "Observe"
[/button]
{VERTICAL_SEP}
[button]
id = "create"
definition = "default"
label = _ "Create Game"
[/button]
{VERTICAL_SEP}
[button]
id = "show_help"
definition = "default"
label = _ "Help"
[/button]
[/column]
[/row]
[row]
grow_factor = 1
[column]
horizontal_grow = "true"
{PLAYERLISTBOX}
{HORIZONTAL_END}
#enddef
[window]
id = "lobby_main"
description = "Lobby screen."
@ -364,13 +424,58 @@
grow_factor = 0
[column]
grow_factor = 1
border = "all"
border_size = 5
horizontal_alignment = "left"
[label]
definition = "title"
label = _ "Multiplayer Lobby"
[/label]
{_GUI_TITLE}
[/column]
[/row]
[row]
grow_factor = 1
[column]
horizontal_grow = "true"
vertical_grow = "true"
[grid]
[row]
[column]
grow_factor = 1
vertical_grow = "true"
horizontal_grow = "true"
[grid]
[row]
grow_factor = 1
[column]
vertical_grow = "true"
horizontal_grow = "true"
[spacer]
id = "game_area"
[/spacer]
[/column]
[/row]
[row]
[column]
vertical_grow = "true"
horizontal_grow = "true"
[spacer]
id = "filter_area"
[/spacer]
[/column]
[/row]
[row]
[column]
vertical_grow = "true"
horizontal_grow = "true"
[spacer]
id = "chat_area"
[/spacer]
[/column]
[/row]
[/grid]
[/column]
[column]
vertical_alignment = "top"
{_GUI_CONTROL_AREA}
[/column]
[/row]
[/grid]
[/column]
[/row]
[row]
@ -458,52 +563,9 @@
{HORIZONTAL_END}
{VERTICAL_END}
{HORIZONTAL_SEP}
vertical_alignment = "top"
{VERTICAL_BEGIN}
[button]
id = "quit"
definition = "default"
label = _ "Quit"
[/button]
{VERTICAL_SEP}
[button]
id = "show_preferences"
definition = "default"
label = _ "Preferences"
[/button]
{VERTICAL_SEP}
[button]
id = "refresh"
definition = "default"
label = _ "Refresh"
[/button]
{VERTICAL_SEP}
[button]
id = "join_global"
definition = "default"
label = _ "Join"
[/button]
{VERTICAL_SEP}
[button]
id = "observe_global"
definition = "default"
label = _ "Observe"
[/button]
{VERTICAL_SEP}
[button]
id = "create"
definition = "default"
label = _ "Create Game"
[/button]
{VERTICAL_SEP}
[button]
id = "show_help"
definition = "default"
label = _ "Help"
[/button]
{VERTICAL_SEP}
horizontal_grow = "true"
{PLAYERLISTBOX}
[spacer]
[/spacer]
{VERTICAL_END}
{HORIZONTAL_END}
[/column]
@ -512,6 +574,8 @@
[/resolution]
[/window]
#undef _GUI_CONTROL_AREA
#undef _GUI_TITLE
#undef GAMELISTBOX
#undef PLAYERLISTBOX
#undef ROOMLISTBOX