Add mounting reset (two-pose reset) (#251)

This commit is contained in:
Butterscotch! authored and GitHub committed 2022-11-22 04:40:13 +03:00
1 parent 85ea2a0d06
commit 5b44eaddfa
17 files changed
+242 -36

No files matched your search

@@ -12,6 +12,7 @@ import io.eiren.util.logging.LogManager;
public class Keybinding implements HotkeyListener {
private static final int RESET = 1;
private static final int QUICK_RESET = 2;
private static final int RESET_MOUNTING = 3;
public final VRServer server;
@@ -42,6 +43,10 @@ public class Keybinding implements HotkeyListener {
String quickResetBinding = this.config.getQuickResetBinding();
JIntellitype.getInstance().registerHotKey(QUICK_RESET, quickResetBinding);
LogManager.info("[Keybinding] Bound quick reset to " + quickResetBinding);
String resetMountingBinding = this.config.getResetMountingBinding();
JIntellitype.getInstance().registerHotKey(RESET_MOUNTING, resetMountingBinding);
LogManager.info("[Keybinding] Bound reset mounting to " + resetMountingBinding);
}
} catch (Throwable e) {
LogManager
@@ -63,6 +68,10 @@ public class Keybinding implements HotkeyListener {
LogManager.info("[Keybinding] Quick reset pressed");
server.resetTrackersYaw();
}
case RESET_MOUNTING -> {
LogManager.info("[Keybinding] Reset mounting pressed");
server.resetTrackersMounting();
}
}
}
}