sound changes, press sounds, remove pitch
This commit is contained in:
parent
c5219ce100
commit
c602585e6a
76 changed files with 231 additions and 251 deletions
|
@ -40,5 +40,6 @@ public class ActButton extends Element {
|
|||
public void mouse(Button btn, int x, int y, boolean ctrl, boolean shift) {
|
||||
this.func.use(this, (ctrl || (btn == Button.MOUSE_MIDDLE)) ? Mode.TERTIARY : ((shift || (btn == Button.MOUSE_RIGHT)) ? Mode.SECONDARY : Mode.PRIMARY));
|
||||
this.formatText();
|
||||
this.playSound();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,12 @@ package game.gui.element;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.audio.PositionedSound;
|
||||
import game.audio.Volume;
|
||||
import game.gui.Font;
|
||||
import game.gui.Gui;
|
||||
import game.gui.element.Dropdown.Handle;
|
||||
import game.init.SoundEvent;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.Drawing.Vec2i;
|
||||
import game.util.Formatter;
|
||||
|
@ -276,4 +279,8 @@ public abstract class Element {
|
|||
public void drawPress() {
|
||||
Drawing.drawRectColor(this.pos_x, this.pos_y, this.size_x, this.size_y, this.gm.style.press);
|
||||
}
|
||||
|
||||
public void playSound() {
|
||||
this.gm.getSoundManager().playSound(new PositionedSound(SoundEvent.CLICK, Volume.GUI));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue