mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Fix toolbox regression
- Fix toolbox menu closing regression
This commit is contained in:
parent
b0ec966b98
commit
68bf1f399a
1 changed files with 11 additions and 8 deletions
|
@ -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 a new issue