mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-23 21:50:02 +00:00
GUI Scaling
* Recipe GUI now scales with window size, and displays more than 2 recipes per page, depending on height. * Hacks to implement recipes per page, based on some assumptions since the height of the handlers are not exposed and are hardcoded * _Temporarily_ disabled the overlay buttons; they were hardcoded to expect at most 2, need to make them dynamic and actually work again.
This commit is contained in:
1 parent
a6b306263d
commit
509078da35
4 files changed
+139
-75
No files matched your search
@@ -43,14 +43,14 @@ public class DrawableResource extends Image {
|
||||
public void draw(int xOffset, int yOffset, int maskTop, int maskBottom, int maskLeft, int maskRight) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(this.resourceLocation);
|
||||
|
||||
int x = xOffset + this.paddingLeft + maskLeft;
|
||||
int y = yOffset + this.paddingTop + maskTop;
|
||||
int u = this.x + maskLeft;
|
||||
int v = this.y + maskTop;
|
||||
int width = this.width - maskRight - maskLeft;
|
||||
int height = this.height - maskBottom - maskTop;
|
||||
final int x = xOffset + this.paddingLeft + maskLeft;
|
||||
final int y = yOffset + this.paddingTop + maskTop;
|
||||
final int textureX = this.x + maskLeft;
|
||||
final int textureY = this.y + maskTop;
|
||||
final int width = this.width - maskRight - maskLeft;
|
||||
final int height = this.height - maskBottom - maskTop;
|
||||
// drawModalRectWithCustomSizedTexture
|
||||
Gui.func_146110_a(x, y, u, v, width, height, textureWidth, textureHeight);
|
||||
Gui.func_146110_a(x, y, textureX, textureY, width, height, textureWidth, textureHeight);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user