private void HyperWarpKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "HyperWarp"); TimeController.Instance.ToggleHyperWarp(); } }
private void ToggleGUIKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "ToggleGUIKeyPress"); TCGUI.Instance.ToggleGUIVisibility(); } }
private void PauseKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "PauseKeyPress"); TimeController.Instance.TogglePause(); } }
private void CustomKeySliderKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "SetCustomKeySlider"); TimeController.Instance.UpdateTimeSlider(Settings.Instance.CustomKeySlider); } }
private void SlowMo64KeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "SetSlowMo64"); TimeController.Instance.UpdateTimeSlider(1); } }
private void StepKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "StepKeyPress"); TimeController.Instance.IncrementTimeStep(); } }
private void RealtimeKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "RealtimeKeyPress"); TimeController.Instance.Realtime(); } }
private void SlowDownKeyPress(TCKeyBinding k) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "SlowDownKeyPress Started"); } if (keysReleased.Contains(k.KeyCombination.Last())) { LogKeyPress(k, "SlowDownKeyPress Ended"); } if (TimeController.Instance.CurrentWarpState == TimeControllable.Hyper) { if (keysPressedDown.Contains(k.KeyCombination.Last())) { TimeController.Instance.SlowDownTime(); } } else { TimeController.Instance.SlowDownTime(); } }
private void LogKeyPress(TCKeyBinding k, string caller) { Log.Trace(String.Format("Key Pressed {0} : {1}", k.KeyCombination.Select(x => x.ToString()).Aggregate((current, next) => current + " + " + next), k.Description), "KeyboardInputManager." + caller); }