add new click sound and play each time style/layout dial button rotates.
parent
2d3ab0938c
commit
1d6c7213c4
Binary file not shown.
|
@ -24,6 +24,7 @@ public enum MagicSound {
|
|||
BEEP("noAction.wav"),
|
||||
BOOM("boom.wav"),
|
||||
REMOVE_CARD("cardTakeOutPackage1.wav"),
|
||||
CLICK("click.wav"),
|
||||
|
||||
// gameSounds - keep sorted and verify enumset range if changed.
|
||||
COMBAT("combat.au"),
|
||||
|
@ -32,7 +33,7 @@ public enum MagicSound {
|
|||
RESOLVE("resolve.au"),
|
||||
WIN("win.au");
|
||||
|
||||
private static final Set<MagicSound> uiSounds = EnumSet.range(ADD_CARD, REMOVE_CARD);
|
||||
private static final Set<MagicSound> uiSounds = EnumSet.range(ADD_CARD, CLICK);
|
||||
private static final Set<MagicSound> gameSounds = EnumSet.range(COMBAT, WIN);
|
||||
|
||||
private static final GeneralConfig config = GeneralConfig.getInstance();
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.awt.image.BufferedImage;
|
|||
import javax.swing.AbstractAction;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.SwingUtilities;
|
||||
import magic.ui.MagicSound;
|
||||
import magic.ui.helpers.ImageHelper;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
|
@ -37,6 +38,7 @@ public class BigDialButton extends ActionBarButton {
|
|||
if (SwingUtilities.isLeftMouseButton(e)) {
|
||||
position = position >= positions - 1 ? 0 : position + 1;
|
||||
rotateIconImage();
|
||||
MagicSound.CLICK.play();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -10,6 +10,7 @@ import javax.swing.ImageIcon;
|
|||
import javax.swing.SwingUtilities;
|
||||
import magic.data.MagicIcon;
|
||||
import magic.ui.MagicImages;
|
||||
import magic.ui.MagicSound;
|
||||
import magic.ui.helpers.ImageHelper;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
|
@ -35,6 +36,7 @@ public class DialButton extends ActionBarButton {
|
|||
if (SwingUtilities.isLeftMouseButton(e)) {
|
||||
position = (position + increment) % 360;
|
||||
rotateIconImage();
|
||||
MagicSound.CLICK.play();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue