Skip to content

Commit

Permalink
Fix: render POI tooltip above everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Oct 27, 2023
1 parent aca7603 commit ea84bb0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ protected void renderWidget(final GuiGraphics graphics, final int mouseX, final
final int tooltipHeight = TOOLTIP_HEIGHT;
setWidth(SIZE + tooltipWidth);

graphics.pose().pushPose();
graphics.pose().translate(0.0f, 0.0f, 100.0f);

graphics.blitNineSliced(TOOLTIP_LOCATION, getX(), getY() + (getHeight() - tooltipHeight) / 2, getWidth(), tooltipHeight, BORDER_SIZE, 200, 20, 0, 29);
graphics.blitNineSliced(TOOLTIP_LOCATION, getX(), getY(), SIZE, SIZE, BORDER_SIZE, 200, 20, 0, 55);

Expand All @@ -78,6 +81,8 @@ protected void renderWidget(final GuiGraphics graphics, final int mouseX, final
graphics.drawString(font, getMessage(), textLeft, textTop, CommonColors.WHITE);

graphics.disableScissor();

graphics.pose().popPose();
} else {
setWidth(SIZE);
graphics.blitNineSliced(TOOLTIP_LOCATION, getX() + 1, getY() + 1, SIZE - 2, SIZE - 2, BORDER_SIZE, 200, 20, 0, 55);
Expand Down

0 comments on commit ea84bb0

Please sign in to comment.