Added Keybinding to toggle Path Preview Visibility

This commit is contained in:
CrushedPixel
2015-06-15 11:55:57 +02:00
committed by johni0702
parent 3df1bdcfc8
commit 3341b3e681
3 changed files with 7 additions and 0 deletions

View File

@@ -173,5 +173,9 @@ public class KeyInputHandler {
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_KEYFRAME_PRESETS) && (kb.isPressed() || kb.getKeyCode() == keyCode)) { if(kb.getKeyDescription().equals(KeybindRegistry.KEY_KEYFRAME_PRESETS) && (kb.isPressed() || kb.getKeyCode() == keyCode)) {
mc.displayGuiScreen(new GuiKeyframeRepository(ReplayHandler.getKeyframeRepository())); mc.displayGuiScreen(new GuiKeyframeRepository(ReplayHandler.getKeyframeRepository()));
} }
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_PATH_PREVIEW) && (kb.isPressed() || kb.getKeyCode() == keyCode)) {
ReplayMod.replaySettings.setShowPathPreview(!ReplayMod.replaySettings.showPathPreview());
}
} }
} }

View File

@@ -21,6 +21,7 @@ public class KeybindRegistry {
public static final String KEY_RESET_TILT = "replaymod.input.resettilt"; public static final String KEY_RESET_TILT = "replaymod.input.resettilt";
public static final String KEY_PLAY_PAUSE = "replaymod.input.playpause"; public static final String KEY_PLAY_PAUSE = "replaymod.input.playpause";
public static final String KEY_ADD_MARKER = "replaymod.input.marker"; public static final String KEY_ADD_MARKER = "replaymod.input.marker";
public static final String KEY_PATH_PREVIEW = "replaymod.input.pathpreview";
private static Minecraft mc = Minecraft.getMinecraft(); private static Minecraft mc = Minecraft.getMinecraft();
public static void initialize() { public static void initialize() {
@@ -37,6 +38,7 @@ public class KeybindRegistry {
bindings.add(new KeyBinding(KEY_RESET_TILT, Keyboard.KEY_K, "replaymod.title")); bindings.add(new KeyBinding(KEY_RESET_TILT, Keyboard.KEY_K, "replaymod.title"));
bindings.add(new KeyBinding(KEY_ROLL_COUNTERCLOCKWISE, Keyboard.KEY_J, "replaymod.title")); bindings.add(new KeyBinding(KEY_ROLL_COUNTERCLOCKWISE, Keyboard.KEY_J, "replaymod.title"));
bindings.add(new KeyBinding(KEY_PLAY_PAUSE, Keyboard.KEY_P, "replaymod.title")); bindings.add(new KeyBinding(KEY_PLAY_PAUSE, Keyboard.KEY_P, "replaymod.title"));
bindings.add(new KeyBinding(KEY_PATH_PREVIEW, Keyboard.KEY_H, "replaymod.title"));
mc.gameSettings.keyBindings = bindings.toArray(new KeyBinding[bindings.size()]); mc.gameSettings.keyBindings = bindings.toArray(new KeyBinding[bindings.size()]);

View File

@@ -232,6 +232,7 @@ replaymod.input.rollcounterclockwise=Roll Counterclockwise
replaymod.input.resettilt=Reset Camera Tilt replaymod.input.resettilt=Reset Camera Tilt
replaymod.input.playpause=Play/Pause Replay replaymod.input.playpause=Play/Pause Replay
replaymod.input.marker=Add Event Marker replaymod.input.marker=Add Event Marker
replaymod.input.pathpreview=Toggle Path Preview
#Keyframe Presets GUI #Keyframe Presets GUI
replaymod.gui.keyframerepository.title=Keyframe Repository replaymod.gui.keyframerepository.title=Keyframe Repository