mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Prevent tooltips from going off the top of the screen.
This commit is contained in:
1 parent
bd494af7ee
commit
49596910fc
1 file changed
+6
-2
@@ -361,9 +361,13 @@ public class GuiUtils
|
||||
}
|
||||
}
|
||||
|
||||
if (tooltipY + tooltipHeight + 6 > screenHeight)
|
||||
if (tooltipY < 4)
|
||||
{
|
||||
tooltipY = screenHeight - tooltipHeight - 6;
|
||||
tooltipY = 4;
|
||||
}
|
||||
else if (tooltipY + tooltipHeight + 4 > screenHeight)
|
||||
{
|
||||
tooltipY = screenHeight - tooltipHeight - 4;
|
||||
}
|
||||
|
||||
final int zLevel = 300;
|
||||
|
||||
Reference in new issue
Block a user