From 3d09e8523f074de597d633c86a8e76e91b1299f1 Mon Sep 17 00:00:00 2001 From: BrockWS Date: Tue, 12 Mar 2019 15:43:58 +1100 Subject: [PATCH] Fixed Tall Terminal Style Fixes #365 --- .../client/gui/part/GuiArcaneTerminal.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/thaumicenergistics/client/gui/part/GuiArcaneTerminal.java b/src/main/java/thaumicenergistics/client/gui/part/GuiArcaneTerminal.java index ccfbc3a0..7f1aba12 100644 --- a/src/main/java/thaumicenergistics/client/gui/part/GuiArcaneTerminal.java +++ b/src/main/java/thaumicenergistics/client/gui/part/GuiArcaneTerminal.java @@ -76,10 +76,12 @@ public void initGui() { this.xSize = 197; this.ySize = 190; + double remainingY = this.height - this.ySize; + int maxRows = (int) Math.floor(remainingY / 18); if (ThEApi.instance().config().terminalStyle() != TerminalStyle.TALL) { - this.rows = 6; + this.rows = Math.min(maxRows, 6); } else { - this.rows = 15; + this.rows = maxRows; } this.ySize += 18 * this.rows;