fix buildpalette stealing all the input
This commit is contained in:
@@ -144,11 +144,13 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
public override bool HandleKeyPress(KeyInput e)
|
public override bool HandleKeyPress(KeyInput e)
|
||||||
{
|
{
|
||||||
if (e.KeyChar == 09)
|
if (e.KeyChar == '\t')
|
||||||
|
{
|
||||||
TabChange(e.Modifiers.HasModifier(Modifiers.Shift));
|
TabChange(e.Modifiers.HasModifier(Modifiers.Shift));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
DoBuildingHotkey(Char.ToLowerInvariant(e.KeyChar), Game.world);
|
return DoBuildingHotkey(Char.ToLowerInvariant(e.KeyChar), Game.world);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandleInput(MouseInput mi)
|
public override bool HandleInput(MouseInput mi)
|
||||||
@@ -506,7 +508,7 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
bool DoBuildingHotkey(char c, World world)
|
bool DoBuildingHotkey(char c, World world)
|
||||||
{
|
{
|
||||||
if (!paletteOpen) return true;
|
if (!paletteOpen) return false;
|
||||||
|
|
||||||
var buildable = Rules.TechTree.BuildableItems(world.LocalPlayer, currentTab);
|
var buildable = Rules.TechTree.BuildableItems(world.LocalPlayer, currentTab);
|
||||||
|
|
||||||
@@ -516,9 +518,10 @@ namespace OpenRA.Widgets
|
|||||||
{
|
{
|
||||||
Sound.Play(TabClick);
|
Sound.Play(TabClick);
|
||||||
HandleBuildPalette(world, toBuild, true);
|
HandleBuildPalette(world, toBuild, true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabChange(bool shift)
|
void TabChange(bool shift)
|
||||||
|
|||||||
Reference in New Issue
Block a user