diff --git a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/AbstractInstrumentScreen.java b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/AbstractInstrumentScreen.java index 7f8f4b3e..f9dc5ca5 100644 --- a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/AbstractInstrumentScreen.java +++ b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/AbstractInstrumentScreen.java @@ -222,7 +222,7 @@ protected AbstractWidget initOptionsButton(final int vertOffset) { @Override public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) { - if (checkPitchInstrumentUp(pKeyCode, pScanCode)) + if (checkPitchTransposeUp(pKeyCode, pScanCode)) return true; final NoteButton note = getNoteByKey(pKeyCode); @@ -236,7 +236,7 @@ public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) { } @Override public boolean keyReleased(int pKeyCode, int pScanCode, int pModifiers) { - if (checkPitchInstrumentDown(pKeyCode, pScanCode)) + if (checkTransposeDown(pKeyCode, pScanCode)) return true; unlockFocused(); @@ -249,13 +249,13 @@ public boolean keyReleased(int pKeyCode, int pScanCode, int pModifiers) { } private boolean pitchChanged; - protected boolean checkPitchInstrumentUp(int pKeyCode, int pScanCode) { - if (!pitchChanged && InstrumentKeyMappings.PITCH_UP_MODIFIER.get().matches(pKeyCode, pScanCode)) { + protected boolean checkPitchTransposeUp(int pKeyCode, int pScanCode) { + if (!pitchChanged && InstrumentKeyMappings.TRANSPOSE_UP_MODIFIER.get().matches(pKeyCode, pScanCode)) { setPitch(getPitch() + 1); pitchChanged = true; return true; } - if (!pitchChanged && InstrumentKeyMappings.PITCH_DOWN_MODIFIER.get().matches(pKeyCode, pScanCode)) { + if (!pitchChanged && InstrumentKeyMappings.TRANSPOSE_DOWN_MODIFIER.get().matches(pKeyCode, pScanCode)) { setPitch(getPitch() - 1); pitchChanged = true; return true; @@ -263,13 +263,13 @@ protected boolean checkPitchInstrumentUp(int pKeyCode, int pScanCode) { return false; } - protected boolean checkPitchInstrumentDown(int pKeyCode, int pScanCode) { - if (pitchChanged && InstrumentKeyMappings.PITCH_UP_MODIFIER.get().matches(pKeyCode, pScanCode)) { + protected boolean checkTransposeDown(int pKeyCode, int pScanCode) { + if (pitchChanged && InstrumentKeyMappings.TRANSPOSE_UP_MODIFIER.get().matches(pKeyCode, pScanCode)) { initPitch(this::setPitch); pitchChanged = false; return true; } - if (pitchChanged && InstrumentKeyMappings.PITCH_DOWN_MODIFIER.get().matches(pKeyCode, pScanCode)) { + if (pitchChanged && InstrumentKeyMappings.TRANSPOSE_DOWN_MODIFIER.get().matches(pKeyCode, pScanCode)) { initPitch(this::setPitch); pitchChanged = false; return true; diff --git a/src/main/java/com/cstav/genshinstrument/client/keyMaps/InstrumentKeyMappings.java b/src/main/java/com/cstav/genshinstrument/client/keyMaps/InstrumentKeyMappings.java index be926f85..c6e075fe 100644 --- a/src/main/java/com/cstav/genshinstrument/client/keyMaps/InstrumentKeyMappings.java +++ b/src/main/java/com/cstav/genshinstrument/client/keyMaps/InstrumentKeyMappings.java @@ -41,15 +41,15 @@ public boolean conflicts(IKeyConflictContext other) { }; - public static final Lazy PITCH_UP_MODIFIER = Lazy.of( - () -> new KeyMapping(CATEGORY+".pitch_up_modifier", + public static final Lazy TRANSPOSE_UP_MODIFIER = Lazy.of( + () -> new KeyMapping(CATEGORY+".transpose_up_modifier", INSTRUMENT_KEY_CONFLICT_CONTEXT, InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_RIGHT_SHIFT , CATEGORY) ); - public static final Lazy PITCH_DOWN_MODIFIER = Lazy.of( - () -> new KeyMapping(CATEGORY+".pitch_down_modifier", + public static final Lazy TRANSPOSE_DOWN_MODIFIER = Lazy.of( + () -> new KeyMapping(CATEGORY+".transpose_down_modifier", INSTRUMENT_KEY_CONFLICT_CONTEXT, InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_LEFT_SHIFT @@ -59,8 +59,8 @@ public boolean conflicts(IKeyConflictContext other) { @SubscribeEvent public static void registerKeybinds(final RegisterKeyMappingsEvent event) { - event.register(PITCH_UP_MODIFIER.get()); - event.register(PITCH_DOWN_MODIFIER.get()); + event.register(TRANSPOSE_UP_MODIFIER.get()); + event.register(TRANSPOSE_DOWN_MODIFIER.get()); } diff --git a/src/main/resources/assets/genshinstrument/lang/en_us.json b/src/main/resources/assets/genshinstrument/lang/en_us.json index 1b5d85d7..808a228d 100644 --- a/src/main/resources/assets/genshinstrument/lang/en_us.json +++ b/src/main/resources/assets/genshinstrument/lang/en_us.json @@ -1,7 +1,7 @@ { "genshinstrument.keymaps": "Instruments GUI", - "genshinstrument.keymaps.pitch_down_modifier": "Pitch Instrument Down", - "genshinstrument.keymaps.pitch_up_modifier": "Pitch Instrument Up", + "genshinstrument.keymaps.transpose_up_modifier": "Transpose Instrument Up", + "genshinstrument.keymaps.transpose_down_modifier": "Transpose Instrument Down", "genshinstrument.itemGroup.instruments": "Instruments", diff --git a/src/main/resources/assets/genshinstrument/lang/he_il.json b/src/main/resources/assets/genshinstrument/lang/he_il.json index 0e55da30..9326ce7a 100644 --- a/src/main/resources/assets/genshinstrument/lang/he_il.json +++ b/src/main/resources/assets/genshinstrument/lang/he_il.json @@ -1,7 +1,7 @@ { "genshinstrument.keymaps": "כלי נגינה", - "genshinstrument.keymaps.pitch_down_modifier": "המנך גובה צליל", - "genshinstrument.keymaps.pitch_up_modifier": "הגבהה גובה צליל", + "genshinstrument.keymaps.transpose_down_modifier": "המנך גובה צליל", + "genshinstrument.keymaps.transpose_up_modifier": "הגבהה גובה צליל", "genshinstrument.itemGroup.instruments": "כלי נגינה", diff --git a/src/main/resources/assets/genshinstrument/lang/ru_ru.json b/src/main/resources/assets/genshinstrument/lang/ru_ru.json index b17778ec..7c81da83 100644 --- a/src/main/resources/assets/genshinstrument/lang/ru_ru.json +++ b/src/main/resources/assets/genshinstrument/lang/ru_ru.json @@ -1,7 +1,7 @@ { "genshinstrument.keymaps": "инструменты", - "genshinstrument.keymaps.pitch_down_modifier": "Уменьшение высоты инструмента", - "genshinstrument.keymaps.pitch_up_modifier": "Повышение высоты инструмента", + "genshinstrument.keymaps.transpose_up_modifier": "Повышение высоты инструмента", + "genshinstrument.keymaps.transpose_down_modifier": "Уменьшение высоты инструмента", "genshinstrument.itemGroup.instruments": "инструменты",