public void FindShortcutEntries(List <KeyCombination> combinationSequence, IContextManager contextManager, List <ShortcutEntry> outputShortcuts) { outputShortcuts.Clear(); Assert.IsNotNull(combinationSequence); Assert.IsTrue(combinationSequence.Count > 0, "Sequence can not be empty"); foreach (var shortcutEntry in m_ShortcutEntries) { if (shortcutEntry.StartsWith(combinationSequence)) { if (!contextManager.HasActiveContextOfType(shortcutEntry.context)) { continue; } if (shortcutEntry.type != ShortcutType.Menu && contextManager.playModeContextIsActive) { // Emulate old play mode shortcut behavior // * Menu shortcuts are always active // * Non-menu shortcuts only apply when the game view does not have focus continue; } outputShortcuts.Add(shortcutEntry); } } }
static bool ShortcutEntrySatisfiesContextManager(IContextManager contextManager, ShortcutEntry entry) { return(contextManager.HasActiveContextOfType(entry.context) && // Emulate old play mode shortcut behavior // * Non-menu shortcuts do NOT apply only when the Game View is focused, the editor is playing, and is NOT paused // * Menu shortcuts are always active (!contextManager.playModeContextIsActive || entry.type == ShortcutType.Menu)); }
static bool ShortcutEntrySatisfiesContextManager(ShortcutEntry entry) { return(m_ContextManager.HasActiveContextOfType(entry.context) && // Emulate old play mode shortcut behavior // * Menu shortcuts are always active // * Non-menu shortcuts only apply when the game view does not have focus (!m_ContextManager.playModeContextIsActive || entry.type == ShortcutType.Menu)); }
public void FindShortcutEntries(List <KeyCombination> combinationSequence, IContextManager contextManager, List <ShortcutEntry> outputShortcuts) { outputShortcuts.Clear(); Assert.IsNotNull(combinationSequence); Assert.IsTrue(combinationSequence.Count > 0, "Sequence can not be empty"); foreach (var shortcutEntry in m_ShortcutEntries) { if (shortcutEntry.StartsWith(combinationSequence)) { if (!contextManager.HasActiveContextOfType(shortcutEntry.context)) { continue; } outputShortcuts.Add(shortcutEntry); } } }