Added Camera Tilt Reset Key
This commit is contained in:
@@ -104,12 +104,16 @@ public class KeyInputHandler {
|
||||
|
||||
public void handleCustomKeybindings(KeyBinding kb, boolean found, int keyCode) {
|
||||
//Custom registered handlers
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_CLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !found) {
|
||||
ReplayHandler.addCameraTilt(1);
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_CLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !ReplayHandler.isInPath()) {
|
||||
ReplayHandler.addCameraTilt(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ? 1 : 5);
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_COUNTERCLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !found) {
|
||||
ReplayHandler.addCameraTilt(-1);
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROTATE_COUNTERCLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !ReplayHandler.isInPath()) {
|
||||
ReplayHandler.addCameraTilt(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ? -1 : -5);
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_RESET_TILT) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !found && !ReplayHandler.isInPath()) {
|
||||
ReplayHandler.setCameraTilt(0);
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_THUMBNAIL) && (kb.isPressed() || kb.getKeyCode() == keyCode) && !found) {
|
||||
|
||||
@@ -18,6 +18,7 @@ public class KeybindRegistry {
|
||||
public static final String KEY_KEYFRAME_PRESETS = "replaymod.input.keyframerepository";
|
||||
public static final String KEY_ROTATE_CLOCKWISE = "replaymod.input.rotateclockwise";
|
||||
public static final String KEY_ROTATE_COUNTERCLOCKWISE = "replaymod.input.rotatecounterclockwise";
|
||||
public static final String KEY_RESET_TILT = "replaymod.input.resettilt";
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public static void initialize() {
|
||||
@@ -30,7 +31,8 @@ public class KeybindRegistry {
|
||||
bindings.add(new KeyBinding(KEY_CLEAR_KEYFRAMES, Keyboard.KEY_C, "replaymod.title"));
|
||||
bindings.add(new KeyBinding(KEY_KEYFRAME_PRESETS, Keyboard.KEY_X, "replaymod.title"));
|
||||
bindings.add(new KeyBinding(KEY_ROTATE_CLOCKWISE, Keyboard.KEY_L, "replaymod.title"));
|
||||
bindings.add(new KeyBinding(KEY_ROTATE_COUNTERCLOCKWISE, Keyboard.KEY_K, "replaymod.title"));
|
||||
bindings.add(new KeyBinding(KEY_RESET_TILT, Keyboard.KEY_K, "replaymod.title"));
|
||||
bindings.add(new KeyBinding(KEY_ROTATE_COUNTERCLOCKWISE, Keyboard.KEY_J, "replaymod.title"));
|
||||
|
||||
mc.gameSettings.keyBindings = bindings.toArray(new KeyBinding[bindings.size()]);
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ replaymod.input.synctimeline=Synchronize Timeline
|
||||
replaymod.input.keyframerepository=Open Keyframe Presets
|
||||
replaymod.input.rotateclockwise=Rotate Clockwise
|
||||
replaymod.input.rotatecounterclockwise=Rotate Counterclockwise
|
||||
replaymod.input.resettilt=Reset Camera Tilt
|
||||
|
||||
#Keyframe Presets GUI
|
||||
replaymod.gui.keyframerepository.title=Keyframe Repository
|
||||
|
||||
Reference in New Issue
Block a user