Prevent tooltips from going off the top of the screen.
This commit is contained in:
parent
bd494af7ee
commit
49596910fc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue