fix text field

This commit is contained in:
creeper123123321 2020-09-18 10:41:25 -03:00
parent 5764264e6a
commit 9a0a5e046b

View File

@ -92,6 +92,7 @@ public class ViaConfigScreen extends Screen {
protocolVersion.setListener(new ChangedListener(this::onChangeVersionField));
int clientSideVersion = ViaFabric.config.getClientSideVersion();
protocolVersion.setText(ProtocolUtils.getProtocolName(clientSideVersion));
onChangeVersionField(protocolVersion.getText());
//this.children.add(protocolVersion);
@ -195,5 +196,17 @@ public class ViaConfigScreen extends Screen {
super.tick();
protocolVersion.tick();
}
@Override
protected void keyPressed(char character, int code) {
super.keyPressed(character, code);
protocolVersion.keyPressed(character, code);
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int button) {
super.mouseClicked(mouseX, mouseY, button);
protocolVersion.mouseClicked(mouseX, mouseY, button);
}
}