Added Shortcut to toggle Interpolation ('O' key)
This commit is contained in:
@@ -229,5 +229,9 @@ public class KeyInputHandler {
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_OBJECT_MANAGER) && (kb.isPressed() || kb.getKeyCode() == keyCode)) {
|
||||
mc.displayGuiScreen(new GuiObjectManager());
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_TOGGLE_INTERPOLATION) && (kb.isPressed() || kb.getKeyCode() == keyCode)) {
|
||||
ReplayMod.replaySettings.toggleInterpolation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public class KeybindRegistry {
|
||||
public static final String KEY_PATH_PREVIEW = "replaymod.input.pathpreview";
|
||||
public static final String KEY_ASSET_MANAGER = "replaymod.input.assetmanager";
|
||||
public static final String KEY_OBJECT_MANAGER = "replaymod.input.objectmanager";
|
||||
public static final String KEY_TOGGLE_INTERPOLATION = "replaymod.input.interpolation";
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@Getter
|
||||
@@ -54,6 +55,8 @@ public class KeybindRegistry {
|
||||
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_ASSET_MANAGER, Keyboard.KEY_G, "replaymod.title"));
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_OBJECT_MANAGER, Keyboard.KEY_F, "replaymod.title"));
|
||||
|
||||
replayModKeyBindings.add(new KeyBinding(KEY_TOGGLE_INTERPOLATION, Keyboard.KEY_O, "replaymod.title"));
|
||||
}
|
||||
|
||||
public static void initialize() {
|
||||
|
||||
@@ -57,6 +57,11 @@ public class ReplaySettings {
|
||||
rewriteSettings();
|
||||
}
|
||||
|
||||
public void toggleInterpolation() {
|
||||
ReplayOptions.linear.setValue(!((Boolean)ReplayOptions.linear.getValue()));
|
||||
rewriteSettings();
|
||||
}
|
||||
|
||||
public boolean showRecordingIndicator() {
|
||||
return (Boolean) RecordingOptions.indicator.getValue();
|
||||
}
|
||||
|
||||
@@ -272,6 +272,7 @@ replaymod.input.marker=Add Event Marker
|
||||
replaymod.input.pathpreview=Toggle Path Preview
|
||||
replaymod.input.assetmanager=Asset Manager
|
||||
replaymod.input.objectmanager=Object Manager
|
||||
replaymod.input.interpolation=Toggle Interpolation
|
||||
|
||||
#Keyframe Presets GUI
|
||||
replaymod.gui.keyframerepository.title=Keyframe Repository
|
||||
|
||||
Reference in New Issue
Block a user