fixed broken build palette hotkeys
support modifiers for build palette hotkeys
This commit is contained in:
@@ -461,7 +461,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
WidgetUtils.DrawPanel("dialog4", new Rectangle(Game.Renderer.Resolution.Width - 300, pos.Y, 300, longDescSize + 65));
|
||||
|
||||
Game.Renderer.Fonts["Bold"].DrawText(
|
||||
tooltip.Name + ((buildable.Hotkey != null) ? " ({0})".F(buildable.Hotkey.ToUpper()) : ""),
|
||||
tooltip.Name + (buildable.Hotkey.IsValid() ? " ({0})".F(buildable.Hotkey.DisplayString()) : ""),
|
||||
p.ToInt2() + new int2(5, 5), Color.White);
|
||||
|
||||
var resources = pl.PlayerActor.Trait<PlayerResources>();
|
||||
@@ -502,7 +502,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
if (!paletteOpen) return false;
|
||||
if (CurrentQueue == null) return false;
|
||||
|
||||
var toBuild = CurrentQueue.BuildableItems().FirstOrDefault(b => b.Traits.Get<BuildableInfo>().Hotkey == KeycodeExts.DisplayString(e.Key));
|
||||
var toBuild = CurrentQueue.BuildableItems().FirstOrDefault(b => b.Traits.Get<BuildableInfo>().Hotkey == Hotkey.FromKeyInput(e));
|
||||
|
||||
if (toBuild != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user