Disconnect button in lobby (#191)
This commit is contained in:
@@ -170,8 +170,8 @@ namespace OpenRA
|
||||
var h = 600;
|
||||
var r = new Rectangle( (Game.viewport.Width - w) / 2, (Game.viewport.Height - h) / 2, w, h );
|
||||
|
||||
var typingBox = new Rectangle(r.Left + 20, r.Bottom - 47, r.Width - 40, 27);
|
||||
var chatBox = new Rectangle(r.Left + 20, r.Bottom - 269, r.Width - 40, 220);
|
||||
var typingBox = new Rectangle(r.Left + 20, r.Bottom - 77, r.Width - 40, 27);
|
||||
var chatBox = new Rectangle(r.Left + 20, r.Bottom - 269, r.Width - 40, 190);
|
||||
|
||||
DrawDialogBackground(typingBox, "dialog2");
|
||||
DrawDialogBackground(chatBox, "dialog3");
|
||||
|
||||
@@ -47,6 +47,11 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
mapButton.IsVisible = () => mapButton.Visible && Game.IsHost;
|
||||
|
||||
var disconnectButton = lobby.GetWidget("DISCONNECT_BUTTON");
|
||||
disconnectButton.OnMouseUp = mi => {
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
Game.LobbyInfoChanged += UpdatePlayerList;
|
||||
}
|
||||
|
||||
|
||||
@@ -474,6 +474,14 @@ Container:
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Change Map
|
||||
Button@DISCONNECT_BUTTON:
|
||||
Id:DISCONNECT_BUTTON
|
||||
Visible:true
|
||||
X:PARENT_RIGHT-140
|
||||
Y:PARENT_BOTTOM-43
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Disconnect
|
||||
Background@MAP_CHOOSER:
|
||||
Id:MAP_CHOOSER
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
|
||||
Reference in New Issue
Block a user