Add bindings for stepping backward/forward

This commit is contained in:
Dean Herbert 2024-01-18 20:38:25 +09:00
parent c50534c819
commit 0383bdf6a1
No known key found for this signature in database
2 changed files with 19 additions and 1 deletions

View File

@ -170,6 +170,8 @@ public static IEnumerable<GlobalAction> GetGlobalActionsFor(GlobalActionCategory
new KeyBinding(InputKey.MouseMiddle, GlobalAction.TogglePauseReplay),
new KeyBinding(InputKey.Left, GlobalAction.SeekReplayBackward),
new KeyBinding(InputKey.Right, GlobalAction.SeekReplayForward),
new KeyBinding(InputKey.Comma, GlobalAction.StepReplayBackward),
new KeyBinding(InputKey.Period, GlobalAction.StepReplayForward),
new KeyBinding(new[] { InputKey.Control, InputKey.H }, GlobalAction.ToggleReplaySettings),
};
@ -411,7 +413,13 @@ public enum GlobalAction
IncreaseOffset,
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.DecreaseOffset))]
DecreaseOffset
DecreaseOffset,
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.StepReplayForward))]
StepReplayForward,
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.StepReplayBackward))]
StepReplayBackward,
}
public enum GlobalActionCategory

View File

@ -324,6 +324,16 @@ public static class GlobalActionKeyBindingStrings
/// </summary>
public static LocalisableString SeekReplayBackward => new TranslatableString(getKey(@"seek_replay_backward"), @"Seek replay backward");
/// <summary>
/// "Seek replay forward one frame"
/// </summary>
public static LocalisableString StepReplayForward => new TranslatableString(getKey(@"step_replay_forward"), @"Seek replay forward one frame");
/// <summary>
/// "Step replay backward one frame"
/// </summary>
public static LocalisableString StepReplayBackward => new TranslatableString(getKey(@"step_replay_backward"), @"Step replay backward one frame");
/// <summary>
/// "Toggle chat focus"
/// </summary>