Gui Is closed pressing E
SrRapero720 opened this issue ยท 5 comments
Typing or fixing a URL char with E as key closes the gui like inventory gui.
So if I want to write: gyazo.com/my-pro-pictur... Whoops, Gui was closed.
To fix this just overwrite onKeyPressed on gui
Adding:
@Override
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (keyCode == 256) {
if (this.closeLayerUsingEscape()) {
this.closeTopLayer();
}
return true;
// Using "super.keyPressed()" also handles E, but with this is handled pressing E before CC handles it
} else if (keyCode == this.getSettings().keyInventory.getKey().getValue()) {
return true;
} else if (super.keyPressed(keyCode, scanCode, modifiers)) {
return true;
} else {
return false;
}
}
my bad, i have installed an old version of CreativeCore on 1.19.2
updating it solves it on 1.19.2 (new versions aren't afected)