From a91a36cf65b2c525ba9bf32111616070c9d94c55 Mon Sep 17 00:00:00 2001 From: lukas2005 Date: Mon, 30 Oct 2017 19:58:34 +0100 Subject: [PATCH] now you are able to determin form outide if mouse is hovered over a button --- .../java/com/mrcrayfish/device/api/app/component/Button.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mrcrayfish/device/api/app/component/Button.java b/src/main/java/com/mrcrayfish/device/api/app/component/Button.java index 7f6261b6c..f410f0ec3 100644 --- a/src/main/java/com/mrcrayfish/device/api/app/component/Button.java +++ b/src/main/java/com/mrcrayfish/device/api/app/component/Button.java @@ -294,7 +294,7 @@ protected void playClickSound(SoundHandler handler) handler.playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F)); } - protected boolean isInside(int mouseX, int mouseY) + public boolean isInside(int mouseX, int mouseY) { return mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; }