diff --git a/OpenRA.Mods.Cnc/Widgets/CncServerBrowserLogic.cs b/OpenRA.Mods.Cnc/Widgets/CncServerBrowserLogic.cs index fa010c5f47..1cc74c418f 100644 --- a/OpenRA.Mods.Cnc/Widgets/CncServerBrowserLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/CncServerBrowserLogic.cs @@ -89,14 +89,14 @@ namespace OpenRA.Mods.Cnc.Widgets progressText.IsVisible = () => searchStatus != SearchStatus.Hidden; progressText.GetText = ProgressLabelText; + // Map preview + var preview = panel.GetWidget("MAP_PREVIEW"); + preview.Map = () => CurrentMap(); + preview.IsVisible = () => CurrentMap() != null; // Server info var infoPanel = panel.GetWidget("SERVER_INFO"); infoPanel.IsVisible = () => currentServer != null; - var preview = infoPanel.GetWidget("MAP_PREVIEW"); - preview.Map = () => CurrentMap(); - preview.IsVisible = () => CurrentMap() != null; - infoPanel.GetWidget("SERVER_IP").GetText = () => currentServer.Address; infoPanel.GetWidget("SERVER_MODS").GetText = () => ServerBrowserDelegate.GenerateModsLabel(currentServer); infoPanel.GetWidget("MAP_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown"; @@ -160,7 +160,7 @@ namespace OpenRA.Mods.Cnc.Widgets var game = loop; var template = serverTemplate.Clone() as ContainerWidget; - template.GetBackground = () => (currentServer == game) ? "dialog2" : null; + template.GetBackground = () => (currentServer == game) ? "panel-darkred" : null; template.OnMouseDown = mi => { if (mi.Button != MouseButton.Left) return false; currentServer = game; return true; }; template.IsVisible = () => true; template.GetWidget("TITLE").GetText = () => game.Name; diff --git a/mods/cnc/chrome/directconnect.yaml b/mods/cnc/chrome/directconnect.yaml index cd06fda2e7..7b61739f1d 100644 --- a/mods/cnc/chrome/directconnect.yaml +++ b/mods/cnc/chrome/directconnect.yaml @@ -44,17 +44,17 @@ Container@DIRECTCONNECT_PANEL: Y:50 Width:200 Height:25 - CncMenuButton@JOIN_BUTTON: - Id:JOIN_BUTTON + CncMenuButton@BACK_BUTTON: + Id:BACK_BUTTON X:0 Y:89 Width:140 Height:35 - Text:Join - CncMenuButton@BACK_BUTTON: - Id:BACK_BUTTON + Text:Back + CncMenuButton@JOIN_BUTTON: + Id:JOIN_BUTTON X:230 Y:89 Width:140 Height:35 - Text:Back \ No newline at end of file + Text:Join diff --git a/mods/cnc/chrome/lobby.yaml b/mods/cnc/chrome/lobby.yaml index 83e6b0797f..89aaddd8f1 100644 --- a/mods/cnc/chrome/lobby.yaml +++ b/mods/cnc/chrome/lobby.yaml @@ -335,7 +335,7 @@ Container@SERVER_LOBBY: Children: Container@CHAT_TEMPLATE: Id:CHAT_TEMPLATE - Width:PARENT_RIGHT-28 + Width:PARENT_RIGHT-27 Height:14 X:2 Y:0 @@ -357,27 +357,27 @@ Container@SERVER_LOBBY: Height:14 Width:PARENT_RIGHT - 100 - 10 WordWrap:true - CncMenuButton@START_GAME_BUTTON: - Id:START_GAME_BUTTON + CncMenuButton@DISCONNECT_BUTTON: + Id:DISCONNECT_BUTTON X:0 Y:499 Width:140 Height:35 - Text:Start Game + Text:Leave Game CncMenuButton@CHANGEMAP_BUTTON: Id:CHANGEMAP_BUTTON - X:150 + X:450 Y:499 Width:140 Height:35 Text:Change Map - CncMenuButton@DISCONNECT_BUTTON: - Id:DISCONNECT_BUTTON + CncMenuButton@START_GAME_BUTTON: + Id:START_GAME_BUTTON X:600 Y:499 Width:140 Height:35 - Text:Leave Game + Text:Start Game Background@COLOR_CHOOSER: Id:COLOR_CHOOSER Background:dialog2 diff --git a/mods/cnc/chrome/mapchooser.yaml b/mods/cnc/chrome/mapchooser.yaml index da48139ab2..30524e233c 100644 --- a/mods/cnc/chrome/mapchooser.yaml +++ b/mods/cnc/chrome/mapchooser.yaml @@ -40,7 +40,7 @@ Container@MAP_CHOOSER: Children: Container@MAP_TEMPLATE: Id:MAP_TEMPLATE - Width:PARENT_RIGHT-28 + Width:PARENT_RIGHT-27 Height:25 X:2 Y:0 diff --git a/mods/cnc/chrome/serverbrowser.yaml b/mods/cnc/chrome/serverbrowser.yaml index 7e9f525416..2475014644 100644 --- a/mods/cnc/chrome/serverbrowser.yaml +++ b/mods/cnc/chrome/serverbrowser.yaml @@ -23,11 +23,11 @@ Container@SERVERBROWSER_PANEL: X:15 Y:30 Width:710 - Height:300 + Height:315 Children: Container@SERVER_TEMPLATE: Id:SERVER_TEMPLATE - Width:PARENT_RIGHT-28 + Width:PARENT_RIGHT-27 Height:25 X:2 Y:0 @@ -103,102 +103,102 @@ Container@SERVERBROWSER_PANEL: Font:Bold Align:Center Visible:false - Background@INFO_BG: + Background@MAP_BG: X:15 - Y:345 - Width:710 - Height:140 + Y:355 + Width:130 + Height:130 Background:panel-gray Children: - Container@SERVER_INFO: - Id:SERVER_INFO - Width:PARENT_RIGHT - Height:PARENT_BOTTOM - Visible:false + MapPreview@MAP_PREVIEW: + Id:MAP_PREVIEW + X:1 + Y:1 + Width:128 + Height:128 + Container@SERVER_INFO: + Id:SERVER_INFO + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Visible:false + Children: + Container@STATS_BIN: + X:150 + Y:375 + Width:150 Children: - MapPreview@MAP_PREVIEW: - Id:MAP_PREVIEW - X:10 - Y:10 - Width:128 - Height:128 - Container@STATS_BIN: - X:200 - Y:30 - Width:150 - Children: - Label@SERVER_IP_LABEL: - Id:SERVER_IP_LABEL - X:0 - Y:0 - Align:Right - Width:70 - Height:20 - Text:Server: - Font:Bold - Label@SERVER_IP: - Id:SERVER_IP - X:70 - Y:0 - Align:Left - Width:70 - Height:20 - Label@MAP_PLAYERS_LABEL: - Id:MAP_PLAYERS_LABEL - X:0 - Y:20 - Align:Right - Width:70 - Height:20 - Text:Players: - Font:Bold - Label@MAP_PLAYERS: - Id:MAP_PLAYERS - X:70 - Y:20 - Align:Left - Width:70 - Height:20 - Label@MAP_TITLE_LABEL: - Id:MAP_TITLE_LABEL - X:0 - Y:40 - Align:Right - Width:70 - Height:20 - Text:Map: - Font:Bold - Label@MAP_TITLE: - Id:MAP_TITLE - X:70 - Y:40 - Align:Left - Width:70 - Height:20 - Label@SERVER_MODS_LABEL: - Id:SERVER_MODS_LABEL - X:0 - Y:60 - Align:Right - Width:70 - Height:20 - Text:Mods: - Font:Bold - Label@SERVER_MODS: - Id:SERVER_MODS - X:70 - Y:63 - Align:Left - VAlign:Top - Width:70 - Height:20 - CncMenuButton@JOIN_BUTTON: - Id:JOIN_BUTTON + Label@SERVER_IP_LABEL: + Id:SERVER_IP_LABEL + X:0 + Y:0 + Align:Right + Width:70 + Height:20 + Text:Server: + Font:Bold + Label@SERVER_IP: + Id:SERVER_IP + X:70 + Y:0 + Align:Left + Width:70 + Height:20 + Label@MAP_PLAYERS_LABEL: + Id:MAP_PLAYERS_LABEL + X:0 + Y:20 + Align:Right + Width:70 + Height:20 + Text:Players: + Font:Bold + Label@MAP_PLAYERS: + Id:MAP_PLAYERS + X:70 + Y:20 + Align:Left + Width:70 + Height:20 + Label@MAP_TITLE_LABEL: + Id:MAP_TITLE_LABEL + X:0 + Y:40 + Align:Right + Width:70 + Height:20 + Text:Map: + Font:Bold + Label@MAP_TITLE: + Id:MAP_TITLE + X:70 + Y:40 + Align:Left + Width:70 + Height:20 + Label@SERVER_MODS_LABEL: + Id:SERVER_MODS_LABEL + X:0 + Y:60 + Align:Right + Width:70 + Height:20 + Text:Mods: + Font:Bold + Label@SERVER_MODS: + Id:SERVER_MODS + X:70 + Y:63 + Align:Left + VAlign:Top + Width:70 + Height:20 + CncMenuButton@BACK_BUTTON: + Id:BACK_BUTTON X:0 Y:499 Width:140 Height:35 - Text:Join + Text:Back CncMenuButton@REFRESH_BUTTON: Id:REFRESH_BUTTON X:450 @@ -206,10 +206,10 @@ Container@SERVERBROWSER_PANEL: Width:140 Height:35 Text:Refresh - CncMenuButton@BACK_BUTTON: - Id:BACK_BUTTON + CncMenuButton@JOIN_BUTTON: + Id:JOIN_BUTTON X:600 Y:499 Width:140 Height:35 - Text:Back + Text:Join