Tweaks. The primary button feels better on the right.
This commit is contained in:
@@ -89,14 +89,14 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
progressText.IsVisible = () => searchStatus != SearchStatus.Hidden;
|
||||
progressText.GetText = ProgressLabelText;
|
||||
|
||||
// Map preview
|
||||
var preview = panel.GetWidget<MapPreviewWidget>("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<MapPreviewWidget>("MAP_PREVIEW");
|
||||
preview.Map = () => CurrentMap();
|
||||
preview.IsVisible = () => CurrentMap() != null;
|
||||
|
||||
infoPanel.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address;
|
||||
infoPanel.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => ServerBrowserDelegate.GenerateModsLabel(currentServer);
|
||||
infoPanel.GetWidget<LabelWidget>("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<LabelWidget>("TITLE").GetText = () => game.Name;
|
||||
|
||||
@@ -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
|
||||
Text:Join
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user