protected override Action NavigateDirection(Direction direction, ActionsController.DirectionAction button) { if (button == ActionsController.DirectionAction.D1) { // @fixme On the Vive D1 is trackpad press which works for category switch // however this may be different for Touch/WMR/Knuckles. // This should probably be dealt with by adding Menu Up/Down/Left/Right // and Menu Select, Menu Back, Menu Category Prev/Next as actions // in SteamVR Input when we implement it. if (specialDirectionControlButtons.ContainsKey(direction)) { var control = specialDirectionControlButtons[direction]; return(CallbackPress(EDControlBindings.GetControlButton(control))); } } else { if (directionControlButtons.ContainsKey(direction)) { var control = directionControlButtons[direction]; return(CallbackPress(EDControlBindings.GetControlButton(control))); } } return(() => { }); }
protected override Unpress Activate() { var control = controlButtonAsset.GetControl(); KeyCombo?defaultKeycombo = controlButtonAsset.GetDefaultKeycombo(); var unpress = CallbackPress(EDControlBindings.GetControlButton(control, defaultKeycombo)); return(() => unpress()); }
protected override Action NavigateDirection(Direction direction) { if (directionControlButtons.ContainsKey(direction)) { var control = directionControlButtons[direction]; return(CallbackPress(EDControlBindings.GetControlButton(control))); } return(() => { }); }
private DirectionActionChangeUnpressHandler OnSteppedZoom(DirectionActionChange pEv) { if (steppedZoomDirectionBindings.ContainsKey(pEv.direction)) { var button = steppedZoomDirectionBindings[pEv.direction]; var unpress = CallbackPress(EDControlBindings.GetControlButton(button)); return((uEv) => unpress()); } return((uEv) => { }); }
protected override void Back() { var bindings = EDStateManager.instance.controlBindings; if (bindings != null && bindings.HasKeyboardKeybinding(EDControlButton.GalaxyMapOpen)) { // @fixme See if it's reasonable to swap this with a CallbackPress using pattern like Select() EDControlBindings.GetControlButton(EDControlButton.UI_Back)?.Send(); } else { SendEscape(); } }
protected override void Back() { var bindings = EDStateManager.instance.controlBindings; if (bindings != null && bindings.HasKeyboardKeybinding(EDControlButton.GalaxyMapOpen)) { // On the Galaxy map this will exit // On the System map/orrery this will go to the galaxy map, from where you can exit EDControlBindings.GetControlButton(EDControlButton.GalaxyMapOpen)?.Send(); } else { SendEscape(); } }
protected ActionChangeUnpressHandler OnTargetCurrentSignal(ActionChange pEv) { var unpress = CallbackPress(EDControlBindings.GetControlButton(EDControlButton.ExplorationFSSTarget)); return((uEv) => unpress()); }
protected ActionChangeUnpressHandler OnExit(ActionChange pEv) { var unpress = CallbackPress(EDControlBindings.GetControlButton(EDControlButton.ExplorationFSSQuit)); return((uEv) => unpress()); }
protected ActionChangeUnpressHandler OnNestedToggle(ActionChange pEv) { var unpress = CallbackPress(EDControlBindings.GetControlButton(EDControlButton.UI_Toggle)); return((uEv) => unpress()); }
protected ActionChangeUnpressHandler OnTabNext(ActionChange pEv) { var unpress = CallbackPress(EDControlBindings.GetControlButton(EDControlButton.CycleNextPanel)); return((uEv) => unpress()); }
protected override Action Select() { return(CallbackPress(EDControlBindings.GetControlButton(EDControlButton.UI_Select))); }
protected override Unpress Activate() { var unpress = CallbackPress(EDControlBindings.GetControlButton(buttonBinding, null)); return(() => unpress()); }