Fixed being able to select disabled races

This commit is contained in:
Sollace 2024-02-13 21:58:37 +00:00
parent 9b3cb7944a
commit e7e88c4805
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 12 additions and 1 deletions

View file

@ -28,6 +28,9 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud {
@Override @Override
protected void init() { protected void init() {
if (parent != null) {
parent.init(client, width, height);
}
final int columnHeight = 167; final int columnHeight = 167;
final int columnWidth = 310; final int columnWidth = 310;
final int padding = 15; final int padding = 15;
@ -101,6 +104,12 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud {
@Override @Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
if (parent != null) {
context.getMatrices().push();
context.getMatrices().translate(0, 0, -100);
parent.render(context, 0, 0, delta);
context.getMatrices().pop();
}
renderBackground(context); renderBackground(context);
final int columnHeight = 180; final int columnHeight = 180;

View file

@ -157,8 +157,10 @@ public class TribeSelectionScreen extends GameGui implements HidesHud {
return true; return true;
} }
if (keyCode == GLFW.GLFW_KEY_ENTER) { if (keyCode == GLFW.GLFW_KEY_ENTER) {
if (options.get(SELECTION).active) {
options.get(SELECTION).onPress(); options.get(SELECTION).onPress();
} }
}
return super.keyPressed(keyCode, scanCode, modifiers); return super.keyPressed(keyCode, scanCode, modifiers);
} }