mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 04:32:18 +00:00
Fix not having a clicky noise when you right click a color button
This commit is contained in:
1 parent
4841edb8d7
commit
d4477c6788
1 file changed
+3
@@ -3,9 +3,11 @@ package crazypants.enderio.gui;
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -84,6 +86,7 @@ public class ColorButton extends IconButtonEIO {
|
||||
Rectangle r = new Rectangle(xPosition, yPosition, width, height);
|
||||
if(r.contains(mouseX, mouseY)) {
|
||||
if(rightMouseDown && Mouse.getEventButton() == 1 && !Mouse.getEventButtonState()) {
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
prevColor();
|
||||
gui.doActionPerformed(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user