Skip to content

Commit e986996

Browse files
committed
Another hover fix
1 parent 7ddc4e0 commit e986996

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/main/java/com/ldtteam/blockui/Pane.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,16 @@ public void draw(final BOGuiGraphics target, final double mx, final double my)
371371
}
372372
}
373373

374+
/**
375+
* Called instead of normal draw() if it wasnt called during this frame.
376+
*/
377+
public void drawHidden()
378+
{
379+
final boolean oldCursorInPane = wasCursorInPane;
380+
wasCursorInPane = false;
381+
handleHover(oldCursorInPane);
382+
}
383+
374384
/**
375385
* Draw something after finishing drawing the GUI.
376386
*

src/main/java/com/ldtteam/blockui/views/View.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,24 @@ public void drawSelf(final BOGuiGraphics target, final double mx, final double m
8989
{
9090
child.draw(target, drawX, drawY);
9191
}
92+
else
93+
{
94+
child.drawHidden();
95+
}
9296
}
9397

9498
ms.popPose();
9599
}
96100

101+
@Override
102+
public void drawHidden()
103+
{
104+
for (final Pane child : children)
105+
{
106+
child.drawHidden();
107+
}
108+
}
109+
97110
@Override
98111
public void drawSelfLast(final BOGuiGraphics target, final double mx, final double my)
99112
{

0 commit comments

Comments
 (0)