mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 00:17:51 +00:00
prevent empty pages from being produced (#615)
This commit is contained in:
1 parent
4f60928b61
commit
64a747e4bd
1 file changed
+2
-1
@@ -746,8 +746,9 @@ public class GuiContainerManager {
|
||||
GuiDraw.ITooltipLineHandler line = GuiDraw.getTipLine(text);
|
||||
int lineHeight = line != null ? line.getSize().height
|
||||
: text.endsWith(GuiDraw.TOOLTIP_LINESPACE) && i + 1 < list.size() ? 12 : 10;
|
||||
if (height + lineHeight <= GuiDraw.displaySize().height - 8 * 2 - 10) {
|
||||
if (height + lineHeight <= GuiDraw.displaySize().height - 8 * 2 - 10 || tmp.isEmpty()) {
|
||||
// top & bottom 8px + last line for showing page
|
||||
// and at least include one line per page
|
||||
height += lineHeight;
|
||||
} else {
|
||||
ret.add(new ArrayList<>(tmp));
|
||||
|
||||
Reference in new issue
Block a user