[Fix] Panels only work when placed in origin
This commit is contained in:
parent
24a284c95b
commit
883a7100a5
1 changed files with 3 additions and 0 deletions
|
@ -97,7 +97,10 @@ public class Panel implements ComponentWithBounds, RelativeContainerEventHandler
|
||||||
@Override
|
@Override
|
||||||
public void render(PoseStack poseStack, int mouseX, int mouseY, float deltaTicks) {
|
public void render(PoseStack poseStack, int mouseX, int mouseY, float deltaTicks) {
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
|
poseStack.pushPose();
|
||||||
|
poseStack.translate(bounds.left, bounds.top, 0);
|
||||||
child.render(poseStack, mouseX - bounds.left, mouseY - bounds.top, deltaTicks, bounds, bounds);
|
child.render(poseStack, mouseX - bounds.left, mouseY - bounds.top, deltaTicks, bounds, bounds);
|
||||||
|
poseStack.popPose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue