misc fixes, ui

This commit is contained in:
Sen 2025-03-12 00:13:03 +01:00
parent b7fd82b170
commit 0d14a75957
2 changed files with 5 additions and 1 deletions

View file

@ -68,6 +68,7 @@ import game.gui.GuiMenu;
import game.gui.Style;
import game.gui.container.GuiContainer;
import game.gui.container.GuiInventory;
import game.gui.element.Textbox;
import game.init.BlockRegistry;
import game.init.Config;
import game.init.EntityRegistry;
@ -933,7 +934,7 @@ public class Game implements IThreadListener {
}
if(this.open != null)
this.open.render();
if(Bind.INFO.isDown())
if(Bind.INFO.isDown() && (this.open == null || !(this.open.selected instanceof Textbox)))
this.drawInfo();
if(this.hudOverlay && !(this.open instanceof GuiConsole))
this.drawOverlay();
@ -2389,6 +2390,8 @@ public class Game implements IThreadListener {
this.registerDebug(Keysym.E, "Gegenstands-Cheat-Menü umschalten", new DebugRunner() {
public void execute(Keysym key) {
Log.CONSOLE.user("Cheat-Menü: %s", (Game.this.itemCheat ^= true) ? "an" : "aus");
if(Game.this.open instanceof GuiContainer)
Game.this.open.init();
}
});
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {

View file

@ -152,6 +152,7 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
public void init(int width, int height)
{
super.init(width, height);
this.starting = false;
this.setDimensions(width, height, 48, height - 64);
boolean create = true;