From e9602ca4e9ed88d97bc8fa40bc89a42d5884d8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 20 Mar 2013 12:06:51 +0100 Subject: [PATCH] pull cnc sell/repair button hotkeys from settings --- OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs | 3 +++ mods/cnc/chrome/ingame.yaml | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs index b961612561..cedab28475 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncIngameChromeLogic.cs @@ -123,6 +123,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic BindOrderButton(world, sidebarRoot, "SELL_BUTTON", "sell"); BindOrderButton(world, sidebarRoot, "REPAIR_BUTTON", "repair"); + sidebarRoot.Get("SELL_BUTTON").Key = Game.Settings.Keys.SellKey; + sidebarRoot.Get("REPAIR_BUTTON").Key = Game.Settings.Keys.RepairKey; + var powerManager = world.LocalPlayer.PlayerActor.Trait(); var playerResources = world.LocalPlayer.PlayerActor.Trait(); sidebarRoot.Get("CASH").GetText = () => diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 779d911eed..21d839f3b0 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -112,7 +112,6 @@ Container@PLAYER_WIDGETS: ImageCollection:order-icons ImageName:options ToggleButton@SELL_BUTTON: - Key: [ X:82 Y:0-24 Width:30 @@ -126,7 +125,6 @@ Container@PLAYER_WIDGETS: Y:5 ImageCollection:order-icons ToggleButton@REPAIR_BUTTON: - Key: ] X:122 Y:0-24 Width:30