mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 20:45:10 +01:00
Fix toolbox regression
- Fix toolbox menu closing regression
This commit is contained in:
parent
b0ec966b98
commit
68bf1f399a
@ -351,14 +351,6 @@ public class RadialToolboxMenu extends AbstractSimiScreen {
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int code, int scanCode, int modifiers) {
|
||||
InputConstants.Key mouseKey = InputConstants.getKey(code, scanCode);
|
||||
if (AllKeys.TOOLBELT.getKeybind()
|
||||
.isActiveAndMatches(mouseKey)) {
|
||||
onClose();
|
||||
ToolboxHandlerClient.COOLDOWN = 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
KeyMapping[] hotbarBinds = minecraft.options.keyHotbarSlots;
|
||||
for (int i = 0; i < hotbarBinds.length && i < 8; i++) {
|
||||
if (hotbarBinds[i].matches(code, scanCode)) {
|
||||
@ -385,6 +377,17 @@ public class RadialToolboxMenu extends AbstractSimiScreen {
|
||||
return super.keyPressed(code, scanCode, modifiers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyReleased(int code, int scanCode, int modifiers) {
|
||||
InputConstants.Key mouseKey = InputConstants.getKey(code, scanCode);
|
||||
if (AllKeys.TOOLBELT.getKeybind()
|
||||
.isActiveAndMatches(mouseKey)) {
|
||||
onClose();
|
||||
return true;
|
||||
}
|
||||
return super.keyReleased(code, scanCode, modifiers);
|
||||
}
|
||||
|
||||
public static enum State {
|
||||
SELECT_BOX, SELECT_ITEM, SELECT_ITEM_UNEQUIP, DETACH
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user