Fixed resize
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user