add resume & surrender buttons to ingame menu
This commit is contained in:
@@ -48,6 +48,18 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
optionsBG.GetWidget("BUTTON_RESUME").OnMouseUp = mi =>
|
||||||
|
{
|
||||||
|
optionsBG.Visible = false;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
optionsBG.GetWidget("BUTTON_SURRENDER").OnMouseUp = mi =>
|
||||||
|
{
|
||||||
|
Game.IssueOrder(new Order("Surrender", Game.world.LocalPlayer.PlayerActor));
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
optionsBG.GetWidget("BUTTON_QUIT").OnMouseUp = mi => {
|
optionsBG.GetWidget("BUTTON_QUIT").OnMouseUp = mi => {
|
||||||
Game.Exit();
|
Game.Exit();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ Container:
|
|||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
||||||
Width: 450
|
Width: 450
|
||||||
Height: 300
|
Height: 350
|
||||||
Visible: false
|
Visible: false
|
||||||
Children:
|
Children:
|
||||||
Label@SETTINGS_LABEL_TITLE:
|
Label@SETTINGS_LABEL_TITLE:
|
||||||
@@ -136,6 +136,13 @@ Container:
|
|||||||
Width:300
|
Width:300
|
||||||
Height:20
|
Height:20
|
||||||
Text:Show Performance Information
|
Text:Show Performance Information
|
||||||
|
Checkbox@SETTINGS_CHECKBOX_SYNCREPORTS:
|
||||||
|
Id:SETTINGS_CHECKBOX_SYNCREPORTS
|
||||||
|
X:100
|
||||||
|
Y:180
|
||||||
|
Width:300
|
||||||
|
Height:20
|
||||||
|
Text:Collect Sync Reports
|
||||||
Button@SETTINGS_BUTTON_OK:
|
Button@SETTINGS_BUTTON_OK:
|
||||||
Id:SETTINGS_BUTTON_OK
|
Id:SETTINGS_BUTTON_OK
|
||||||
X:PARENT_RIGHT - 180
|
X:PARENT_RIGHT - 180
|
||||||
@@ -531,7 +538,7 @@ Container:
|
|||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:300
|
Width:300
|
||||||
Height:220
|
Height:280
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
Label@LABEL_TITLE:
|
Label@LABEL_TITLE:
|
||||||
@@ -542,24 +549,38 @@ Container:
|
|||||||
Height:25
|
Height:25
|
||||||
Text:Options
|
Text:Options
|
||||||
Align:Center
|
Align:Center
|
||||||
|
Button@BUTTON_RESUME:
|
||||||
|
Id:BUTTON_RESUME
|
||||||
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y:60
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Resume
|
||||||
|
Button@BUTTON_SURRENDER:
|
||||||
|
Id:BUTTON_SURRENDER
|
||||||
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y:100
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Surrender
|
||||||
Button@BUTTON_SETTINGS:
|
Button@BUTTON_SETTINGS:
|
||||||
Id:BUTTON_SETTINGS
|
Id:BUTTON_SETTINGS
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:80
|
Y:140
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Settings
|
Text:Settings
|
||||||
Button@BUTTON_DISCONNECT:
|
Button@BUTTON_DISCONNECT:
|
||||||
Id:BUTTON_DISCONNECT
|
Id:BUTTON_DISCONNECT
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:120
|
Y:180
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Disconnect
|
Text:Disconnect
|
||||||
Button@BUTTON_QUIT:
|
Button@BUTTON_QUIT:
|
||||||
Id:BUTTON_QUIT
|
Id:BUTTON_QUIT
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:160
|
Y:220
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Quit
|
Text:Quit
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ Container:
|
|||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:300
|
Width:300
|
||||||
Height:220
|
Height:280
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
Label@LABEL_TITLE:
|
Label@LABEL_TITLE:
|
||||||
@@ -549,24 +549,38 @@ Container:
|
|||||||
Height:25
|
Height:25
|
||||||
Text:Options
|
Text:Options
|
||||||
Align:Center
|
Align:Center
|
||||||
|
Button@BUTTON_RESUME:
|
||||||
|
Id:BUTTON_RESUME
|
||||||
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y:60
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Resume
|
||||||
|
Button@BUTTON_SURRENDER:
|
||||||
|
Id:BUTTON_SURRENDER
|
||||||
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
|
Y:100
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Surrender
|
||||||
Button@BUTTON_SETTINGS:
|
Button@BUTTON_SETTINGS:
|
||||||
Id:BUTTON_SETTINGS
|
Id:BUTTON_SETTINGS
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:80
|
Y:140
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Settings
|
Text:Settings
|
||||||
Button@BUTTON_DISCONNECT:
|
Button@BUTTON_DISCONNECT:
|
||||||
Id:BUTTON_DISCONNECT
|
Id:BUTTON_DISCONNECT
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:120
|
Y:180
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Disconnect
|
Text:Disconnect
|
||||||
Button@BUTTON_QUIT:
|
Button@BUTTON_QUIT:
|
||||||
Id:BUTTON_QUIT
|
Id:BUTTON_QUIT
|
||||||
X:(PARENT_RIGHT - WIDTH)/2
|
X:(PARENT_RIGHT - WIDTH)/2
|
||||||
Y:160
|
Y:220
|
||||||
Width:160
|
Width:160
|
||||||
Height:25
|
Height:25
|
||||||
Text:Quit
|
Text:Quit
|
||||||
|
|||||||
Reference in New Issue
Block a user