Skip to content

Commit

Permalink
MP Lobby: completely redesigned game entry layout
Browse files Browse the repository at this point in the history
I did one of these about a year ago, but in the time since I realize it was honestly really crowded
and had some fundamental problems (for example, the listbox would get a horizontal scrollbar if a game
with a lot of mods was started).

This time around, I've focused on simplicity. The main changes:
* The minimap has been made 10 px larger. This was to accommodate the 5 px borders, so now the actual
  map image is 72x72.
* Game name and scenario name have swapped places, and the latter is now larger.
* Game names are no longer colorized based on the number of vacant slots or whether you can observe
  the game or not.
* The Turns/Slots label coloring has been toned down and been made larger. It is now either white
  (game has started), green (vacant slots available), or yellow (vacant slots available for reloaded game).
* The Turns limit  no longer displays "/-" for games with unlimited turns. Now you just get "Turn n".
* Due to 1bfa170, proper names of all missing content is displayed. I also got rid of those
  "Unknown Scenario"/"Unknown Campaign" labels in favor of a simple red-color game type token (S or C),
  respectively.
* All game setting icons have been moved to a tooltip attached to an info icon, except those for
  Password Required and Observes Allowed.
* The info icon will also change color (and its tooltip display a message) if the player need to download
  additional content to join that game.
  • Loading branch information
Vultraz authored and GregoryLundberg committed Nov 30, 2017
1 parent 8e6a756 commit 4c73606
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 260 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -5,6 +5,7 @@ Version 1.13.10+dev:
* Removed broken Unit Box and Widescreen themes.
* Fixed a bug that partially prevented movement feedback announce messages
to be displayed (UI regression bug #2130, affecting 1.13.8 and 1.13.10).
* New, greatly simplified display of games in the MP Lobby.
* WML Engine:
* File paths with backslashes are no longer allowed. This ensures that a UMC
author can't accidentally use them and make an add-on that breaks on
Expand Down
227 changes: 77 additions & 150 deletions data/gui/window/lobby_main.cfg
Expand Up @@ -3,56 +3,24 @@
### Definition of the lobby screen
###

#define GAMELISTBOX_BODY_LABEL_TINY ID LABEL
[column]
border = "right"
border_size = 5
[label]
id = {ID}
definition = "default_tiny"
label = {LABEL}
[/label]
[/column]
#enddef

#define GAMELISTBOX_BODY_IMAGE ID LABEL TOOLTIP GROW_FACTOR
[column]
grow_factor = {GROW_FACTOR}
horizontal_grow = true
border = "all"
border_size = 5
[image]
id = {ID}
definition = "default"
label = {LABEL}
tooltip = {TOOLTIP}
[/image]
[/column]
#enddef

#define GAMELISTBOX_LABEL LABEL
[column]
[label]
definition = "default"
label = {LABEL}
[/label]
[/column]
#enddef

#define GAMELISTBOX
[listbox]
id = "game_list"
definition = "default"

vertical_scrollbar_mode = "always"
horizontal_scrollbar_mode = "auto"

[header]

[row]

[column]
grow_factor = 1
horizontal_grow = true
border = "bottom,right"
border_size = 5

[label]
id = "map"
definition = "default"
Expand All @@ -61,18 +29,27 @@
[/column]
[/row]
[/header]

[list_definition]

[row]

[column]
horizontal_grow = true

[toggle_panel]
id = "panel"
definition = "default"

[grid]

[row]

[column]
grow_factor = 0
{GUI_FORCE_WIDGET_MINIMUM_SIZE 72 72 (
vertical_alignment = "center"

{GUI_FORCE_WIDGET_MINIMUM_SIZE 82 82 (
border = "all"
border_size = 5
[minimap]
Expand All @@ -81,178 +58,128 @@
[/minimap]
)}
[/column]

[column]
grow_factor = 1
horizontal_grow = true

[grid]

[row]

[column]
grow_factor = 1
border = "all"
border_size = 3
horizontal_alignment = "left"

[label]
id = "name"
definition = "default"
id = "scenario"
definition = "default_large"
[/label]
[/column]
[/row]

[row]

[column]
grow_factor = 1
horizontal_grow = true
border = "left,right"
border_size = 3

[label]
id = "scenario"
id = "name"
definition = "default"
[/label]
[/column]
[/row]

[row]
[column]
grow_factor = 1
horizontal_grow = true
[/grid]

[grid]

[row]
grow_factor = 1

[column]
grow_factor = 0
horizontal_grow = true
border = "left,top,bottom"
border_size = 3
[label]
id = "era_label"
definition = "default_small"
label = _ "Era:"
[/label]
[/column]

[column]
grow_factor = 0
horizontal_grow = true
border = "all"
border_size = 3
[label]
id = "era"
definition = "default_small"
[/label]
[/column]

[column]
grow_factor = 0
horizontal_grow = true
border = "all"
border_size = 3
[label]
id = "dash"
definition = "default"
label = ""
[/label]
[/column]

[column]
grow_factor = 0
horizontal_grow = true
border = "left,top,bottom"
border_size = 3
[label]
id = "mods_label"
definition = "default_small"
label = _ "Modifications:"
[/label]
[/column]

[column]
grow_factor = 1
horizontal_grow = true
border = "all"
border_size = 3
[label]
id = "mods"
definition = "default_small"
[/label]
[/column]
[/row]
[/grid]
[/column]

[/column]
[/row]
[/grid]
[column]
grow_factor = 0
border = "all"
border_size = 5
horizontal_alignment = "right"
[label]
id = "status"
definition = "default_large"
[/label]
[/column]

[column]
grow_factor = 0
border = "all"
border_size = 5
horizontal_alignment = "right"
vertical_grow = true

[image]
id = "game_info"
definition = "centered"
label = "icons/icon-info.png"
[/image]
[/column]

[column]
horizontal_alignment = "right"

[grid]

[row]

[column]
grow_factor = 0
border = "left,right,bottom"
horizontal_grow = true
border = "all"
border_size = 5
horizontal_alignment = "right"
[label]
id = "status"

[image]
id = "needs_password"
definition = "default"
[/label]
label = "misc/key.png"
tooltip = _ "Requires a password to join"
[/image]
[/column]

[/row]

[row]
[column]
horizontal_grow = true
[grid]
[row]
{GAMELISTBOX_BODY_IMAGE "map_size_icon" "misc/map.png" "" 0}
{GAMELISTBOX_BODY_LABEL_TINY "map_size_text" "900x900"}
{GAMELISTBOX_BODY_IMAGE "observer_icon" "misc/eye.png" "" 0}
{GAMELISTBOX_BODY_IMAGE "shuffle_sides_icon" "misc/shuffle-sides.png" _"Assign sides to players at random" 0}
{GAMELISTBOX_BODY_IMAGE "needs_password" "misc/key.png" _"Requires a password to join" 0}
{GAMELISTBOX_BODY_IMAGE "registered_only" "misc/registered_users_only.png" _"Only registered users may join" 0}
{GAMELISTBOX_BODY_IMAGE "use_map_settings" "misc/ums.png" _"Use map settings" 0}
{GAMELISTBOX_BODY_IMAGE "reloaded" "misc/reloaded.png" _"Reloaded game" 0}
{GAMELISTBOX_BODY_IMAGE "no_era" "misc/qmark.png" _"Unknown era" 0}
{GAMELISTBOX_BODY_IMAGE "vision_icon" "" "" 0}
{GAMELISTBOX_BODY_IMAGE "gold_icon" "themes/gold.png" _"Gold per village" 0}
{GAMELISTBOX_BODY_LABEL_TINY "gold_text" "265"}
{GAMELISTBOX_BODY_IMAGE "xp_icon" "themes/units.png" _"Experience modifier" 0}
{GAMELISTBOX_BODY_LABEL_TINY "xp_text" "70%"}
{GAMELISTBOX_BODY_IMAGE "time_limit_icon" "themes/sand-clock.png" _"Time limit" 0}
{GAMELISTBOX_BODY_LABEL_TINY "time_limit_text" ""}
[/row]
[/grid]
[/column]
[/row]
[/grid]
[/column]
[column]
horizontal_alignment = "right"
[grid]
[row]
[column]
grow_factor = 1
horizontal_alignment = "right"
border = "top,left,right"
border_size = 5

[button]
id = "join"
definition = "default"
label = _ "Join"
[/button]
[/column]
[/row]

[row]

[column]
grow_factor = 0
horizontal_grow = true
border = "all"
border_size = 5

[image]
id = "observer_icon"
definition = "default"
label = "misc/eye.png"
[/image]
[/column]

[column]
grow_factor = 1
horizontal_alignment = "right"
border = "all"
border_size = 5

[button]
id = "observe"
definition = "default"
Expand Down Expand Up @@ -886,7 +813,7 @@
[/column]
[/row]

{GUI_HORIZONTAL_SPACER_LINE}
#{GUI_HORIZONTAL_SPACER_LINE}

[row]
grow_factor = 1
Expand Down
Binary file added images/icons/icon-info-error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/icon-info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4c73606

Please sign in to comment.