Merge pull request #8582 from Mailaender/hide-ui-hotkey

Added a hide UI hotkey
This commit is contained in:
Oliver Brakmann
2015-06-29 20:16:40 +02:00
5 changed files with 40 additions and 1 deletions

View File

@@ -181,6 +181,7 @@ namespace OpenRA
public Hotkey TogglePixelDoubleKey = new Hotkey(Keycode.PERIOD, Modifiers.None);
public Hotkey DevReloadChromeKey = new Hotkey(Keycode.C, Modifiers.Ctrl | Modifiers.Shift);
public Hotkey HideUserInterfaceKey = new Hotkey(Keycode.H, Modifiers.Ctrl | Modifiers.Shift);
public Hotkey TakeScreenshotKey = new Hotkey(Keycode.P, Modifiers.Ctrl);
public Hotkey Production01Key = new Hotkey(Keycode.F1, Modifiers.None);

View File

@@ -31,6 +31,14 @@ namespace OpenRA.Widgets
return true;
}
if (hk == Game.Settings.Keys.HideUserInterfaceKey)
{
foreach (var child in this.Children)
child.Visible ^= true;
return true;
}
if (hk == Game.Settings.Keys.TakeScreenshotKey)
{
if (e.Event == KeyInputEvent.Down)