BuildPaletteWidget: don't click on buttons if the palette isn't open. Don't allow hotkeys unless palette is open. Move key handling into widget.

This commit is contained in:
alzeih
2010-07-15 14:14:48 +12:00
parent a02fd48597
commit aeefc94fe0
3 changed files with 48 additions and 45 deletions

View File

@@ -514,13 +514,6 @@ namespace OpenRA
if (c == 08)
Game.controller.GotoNextBase();
if (c == 09)
BuildPaletteWidget.TabChange((Control.ModifierKeys & Keys.Shift) == Keys.Shift ? true : false);
// Todo: move this into the widget
BuildPaletteWidget.DoBuildingHotkey(c, world);
if (sync != Game.world.SyncHash())
throw new InvalidOperationException("Desync in OnKeyPress");
}