Fixed resize

This commit is contained in:
2026-03-07 17:23:18 +01:00
parent 196dd08943
commit d4107df833
2 changed files with 4 additions and 5 deletions
@@ -103,7 +103,7 @@ public abstract class SaturnScreen {
} }
public void resize(int width, int height) { public void resize(int width, int height) {
elements.clear(); init();
} }
public boolean keyPressed(int keyCode, int scanCode, int modifiers) { public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
@@ -53,8 +53,6 @@ public class SaturnScreenFabric extends Screen implements ScreenProvider {
@Override @Override
protected void init() { protected void init() {
width *= 2;
height *= 2;
screen.init(); screen.init();
} }
@@ -122,6 +120,7 @@ public class SaturnScreenFabric extends Screen implements ScreenProvider {
@Override @Override
public void resize(MinecraftClient client, int width, int height) { public void resize(MinecraftClient client, int width, int height) {
screen.resize(width, height); screen.resize(width, height);
super.resize(client, width, height);
} }
// ------------------------------------------ // ------------------------------------------
@@ -136,11 +135,11 @@ public class SaturnScreenFabric extends Screen implements ScreenProvider {
@Override @Override
public int getWidth() { public int getWidth() {
return width; return width * 2;
} }
@Override @Override
public int getHeight() { public int getHeight() {
return height; return height * 2;
} }
} }