1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 00:57:55 +00:00

fix: mouseUp (mouseReleased) event

mouseReleased doesn't work at ClickableWidget, why?
This commit is contained in:
Nikita Savyolov
2021-10-10 23:28:07 +03:00
parent fdbf41b3c4
commit ebe847c04b

View File

@@ -108,6 +108,12 @@ public abstract class ComputerScreenBase<T extends ContainerComputerBase> extend
return getFocused() != null && getFocused().mouseDragged( x, y, button, deltaX, deltaY ) || super.mouseDragged( x, y, button, deltaX, deltaY ); return getFocused() != null && getFocused().mouseDragged( x, y, button, deltaX, deltaY ) || super.mouseDragged( x, y, button, deltaX, deltaY );
} }
@Override
public boolean mouseReleased( double mouseX, double mouseY, int button )
{
return (getFocused() != null && getFocused().mouseReleased( mouseX, mouseY, button )) || super.mouseReleased( x, y, button );
}
@Override @Override
protected void drawForeground( @Nonnull MatrixStack transform, int mouseX, int mouseY ) protected void drawForeground( @Nonnull MatrixStack transform, int mouseX, int mouseY )
{ {