pull cnc sell/repair button hotkeys from settings
This commit is contained in:
@@ -123,6 +123,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
BindOrderButton<SellOrderGenerator>(world, sidebarRoot, "SELL_BUTTON", "sell");
|
BindOrderButton<SellOrderGenerator>(world, sidebarRoot, "SELL_BUTTON", "sell");
|
||||||
BindOrderButton<RepairOrderGenerator>(world, sidebarRoot, "REPAIR_BUTTON", "repair");
|
BindOrderButton<RepairOrderGenerator>(world, sidebarRoot, "REPAIR_BUTTON", "repair");
|
||||||
|
|
||||||
|
sidebarRoot.Get<ToggleButtonWidget>("SELL_BUTTON").Key = Game.Settings.Keys.SellKey;
|
||||||
|
sidebarRoot.Get<ToggleButtonWidget>("REPAIR_BUTTON").Key = Game.Settings.Keys.RepairKey;
|
||||||
|
|
||||||
var powerManager = world.LocalPlayer.PlayerActor.Trait<PowerManager>();
|
var powerManager = world.LocalPlayer.PlayerActor.Trait<PowerManager>();
|
||||||
var playerResources = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
|
var playerResources = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
|
||||||
sidebarRoot.Get<LabelWidget>("CASH").GetText = () =>
|
sidebarRoot.Get<LabelWidget>("CASH").GetText = () =>
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
ImageCollection:order-icons
|
ImageCollection:order-icons
|
||||||
ImageName:options
|
ImageName:options
|
||||||
ToggleButton@SELL_BUTTON:
|
ToggleButton@SELL_BUTTON:
|
||||||
Key: [
|
|
||||||
X:82
|
X:82
|
||||||
Y:0-24
|
Y:0-24
|
||||||
Width:30
|
Width:30
|
||||||
@@ -126,7 +125,6 @@ Container@PLAYER_WIDGETS:
|
|||||||
Y:5
|
Y:5
|
||||||
ImageCollection:order-icons
|
ImageCollection:order-icons
|
||||||
ToggleButton@REPAIR_BUTTON:
|
ToggleButton@REPAIR_BUTTON:
|
||||||
Key: ]
|
|
||||||
X:122
|
X:122
|
||||||
Y:0-24
|
Y:0-24
|
||||||
Width:30
|
Width:30
|
||||||
|
|||||||
Reference in New Issue
Block a user