mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-07 22:16:44 +01:00
Fixed being able to select disabled races
This commit is contained in:
parent
9b3cb7944a
commit
e7e88c4805
2 changed files with 12 additions and 1 deletions
|
@ -28,6 +28,9 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud {
|
|||
|
||||
@Override
|
||||
protected void init() {
|
||||
if (parent != null) {
|
||||
parent.init(client, width, height);
|
||||
}
|
||||
final int columnHeight = 167;
|
||||
final int columnWidth = 310;
|
||||
final int padding = 15;
|
||||
|
@ -101,6 +104,12 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud {
|
|||
|
||||
@Override
|
||||
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);
|
||||
|
||||
final int columnHeight = 180;
|
||||
|
|
|
@ -157,7 +157,9 @@ public class TribeSelectionScreen extends GameGui implements HidesHud {
|
|||
return true;
|
||||
}
|
||||
if (keyCode == GLFW.GLFW_KEY_ENTER) {
|
||||
options.get(SELECTION).onPress();
|
||||
if (options.get(SELECTION).active) {
|
||||
options.get(SELECTION).onPress();
|
||||
}
|
||||
}
|
||||
|
||||
return super.keyPressed(keyCode, scanCode, modifiers);
|
||||
|
|
Loading…
Reference in a new issue