Add to cnc, tidy up ingame menus
This commit is contained in:
@@ -162,7 +162,6 @@ namespace OpenRA
|
|||||||
CurrentPort = port;
|
CurrentPort = port;
|
||||||
|
|
||||||
orderManager = new OrderManager(new NetworkConnection(host, port), ChooseReplayFilename());
|
orderManager = new OrderManager(new NetworkConnection(host, port), ChooseReplayFilename());
|
||||||
Game.Settings.DeveloperMode = LobbyInfo.GlobalSettings.AllowCheats;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static string ChooseReplayFilename()
|
static string ChooseReplayFilename()
|
||||||
|
|||||||
@@ -80,29 +80,30 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_GIVE_CASH").Checked =
|
devmodeBG.GetWidget<ButtonWidget>("SETTINGS_GIVE_CASH").OnMouseUp = mi =>
|
||||||
() => true;
|
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_GIVE_CASH").OnMouseDown = mi =>
|
|
||||||
{
|
{
|
||||||
Game.IssueOrder(new Order("DevModeGiveCash", Game.world.LocalPlayer.PlayerActor));
|
Game.IssueOrder(new Order("DevModeGiveCash", Game.world.LocalPlayer.PlayerActor));
|
||||||
|
TriggerCheatingMessage();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_BUILD_SPEED").OnMouseDown = mi =>
|
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_BUILD_SPEED").OnMouseDown = mi =>
|
||||||
{
|
{
|
||||||
Game.IssueOrder(new Order("DevModeFastBuild", Game.world.LocalPlayer.PlayerActor));
|
Game.IssueOrder(new Order("DevModeFastBuild", Game.world.LocalPlayer.PlayerActor));
|
||||||
|
TriggerCheatingMessage();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_BUILD_SPEED").Checked =
|
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_BUILD_SPEED").Checked =
|
||||||
() => true;
|
() => Game.world.LocalPlayer.PlayerActor.traits.Get<DeveloperMode>().FastBuild;
|
||||||
|
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHARGE_TIME").OnMouseDown = mi =>
|
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHARGE_TIME").OnMouseDown = mi =>
|
||||||
{
|
{
|
||||||
|
TriggerCheatingMessage();
|
||||||
Game.IssueOrder(new Order("DevModeFastCharge", Game.world.LocalPlayer.PlayerActor));
|
Game.IssueOrder(new Order("DevModeFastCharge", Game.world.LocalPlayer.PlayerActor));
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHARGE_TIME").Checked =
|
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHARGE_TIME").Checked =
|
||||||
() => true;
|
() => Game.world.LocalPlayer.PlayerActor.traits.Get<DeveloperMode>().FastCharge;
|
||||||
|
|
||||||
|
|
||||||
devModeButton.IsVisible = () => { return Game.Settings.DeveloperMode; };
|
devModeButton.IsVisible = () => { return Game.Settings.DeveloperMode; };
|
||||||
|
|||||||
@@ -243,29 +243,24 @@ Container@ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Show Spatial Index Debug
|
Text:Show Spatial Index Debug
|
||||||
Label@LABEL_MP_WARNING
|
Button@SETTINGS_GIVE_CASH
|
||||||
Id:LABEL_MP_WARNING
|
|
||||||
X:30
|
|
||||||
Y:180
|
|
||||||
Text:Must be identical for all multiplayer players:
|
|
||||||
Checkbox@SETTINGS_GIVE_CASH
|
|
||||||
Id:SETTINGS_GIVE_CASH
|
Id:SETTINGS_GIVE_CASH
|
||||||
X:30
|
X:30
|
||||||
Y:200
|
Y:170
|
||||||
Width:PARENT_RIGHT - 30
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Give Cash
|
Text: Give Cash
|
||||||
Checkbox@SETTINGS_BUILD_SPEED
|
Checkbox@SETTINGS_BUILD_SPEED
|
||||||
Id:SETTINGS_BUILD_SPEED
|
Id:SETTINGS_BUILD_SPEED
|
||||||
X:30
|
X:30
|
||||||
Y:230
|
Y:200
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Build Speed
|
Text:Instant Build Speed
|
||||||
Checkbox@SETTINGS_CHARGE_TIME
|
Checkbox@SETTINGS_CHARGE_TIME
|
||||||
Id:SETTINGS_CHARGE_TIME
|
Id:SETTINGS_CHARGE_TIME
|
||||||
X:30
|
X:30
|
||||||
Y:260
|
Y:230
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Charge Time (Special Powers)
|
Text:Instant Charge Time (Special Powers)
|
||||||
@@ -40,6 +40,7 @@ Player:
|
|||||||
PlayerResources:
|
PlayerResources:
|
||||||
InitialCash: 5000
|
InitialCash: 5000
|
||||||
ActorGroupProxy:
|
ActorGroupProxy:
|
||||||
|
DeveloperMode:
|
||||||
|
|
||||||
World:
|
World:
|
||||||
GlobalDefaults:
|
GlobalDefaults:
|
||||||
|
|||||||
@@ -252,29 +252,24 @@ Container@ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Show Spatial Index Debug
|
Text:Show Spatial Index Debug
|
||||||
Label@LABEL_MP_WARNING
|
Button@SETTINGS_GIVE_CASH
|
||||||
Id:LABEL_MP_WARNING
|
|
||||||
X:30
|
|
||||||
Y:180
|
|
||||||
Text:Must be identical for all multiplayer players:
|
|
||||||
Checkbox@SETTINGS_GIVE_CASH
|
|
||||||
Id:SETTINGS_GIVE_CASH
|
Id:SETTINGS_GIVE_CASH
|
||||||
X:30
|
X:30
|
||||||
Y:200
|
Y:170
|
||||||
Width:PARENT_RIGHT - 30
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Give Cash
|
Text: Give Cash
|
||||||
Checkbox@SETTINGS_BUILD_SPEED
|
Checkbox@SETTINGS_BUILD_SPEED
|
||||||
Id:SETTINGS_BUILD_SPEED
|
Id:SETTINGS_BUILD_SPEED
|
||||||
X:30
|
X:30
|
||||||
Y:230
|
Y:200
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Build Speed
|
Text:Instant Build Speed
|
||||||
Checkbox@SETTINGS_CHARGE_TIME
|
Checkbox@SETTINGS_CHARGE_TIME
|
||||||
Id:SETTINGS_CHARGE_TIME
|
Id:SETTINGS_CHARGE_TIME
|
||||||
X:30
|
X:30
|
||||||
Y:260
|
Y:230
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Charge Time (Special Powers)
|
Text:Instant Charge Time (Special Powers)
|
||||||
Reference in New Issue
Block a user