[Jrisk-cvs] SF.net SVN: domination-code:[2510] Domination/swingUI /src/net/yura/domination/ui/flash
Brought to you by:
yuranet
|
From: <yu...@us...> - 2024-02-11 21:56:55
|
Revision: 2510
http://sourceforge.net/p/domination/code/2510
Author: yuranet
Date: 2024-02-11 21:56:52 +0000 (Sun, 11 Feb 2024)
Log Message:
-----------
some more sounds
Modified Paths:
--------------
Domination/swingUI/src/net/yura/domination/ui/flashgui/GameFrame.java
Domination/swingUI/src/net/yura/domination/ui/flashgui/StatsDialog.java
Modified: Domination/swingUI/src/net/yura/domination/ui/flashgui/GameFrame.java
===================================================================
--- Domination/swingUI/src/net/yura/domination/ui/flashgui/GameFrame.java 2024-02-11 20:01:25 UTC (rev 2509)
+++ Domination/swingUI/src/net/yura/domination/ui/flashgui/GameFrame.java 2024-02-11 21:56:52 UTC (rev 2510)
@@ -250,6 +250,7 @@
int click=insideButton(e.getX(),e.getY());
if (click != -1) { // this means it was one of the view buttons
if (mapView !=click) {
+ GameSound.INSTANCE.playSound(GameSound.BUTTON);
setMapView(click);
}
}
@@ -552,6 +553,10 @@
ActionListener buttonActionListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
+ if (e.getSource() != gobutton || gameState != RiskGame.STATE_PLACE_ARMIES) {
+ GameSound.INSTANCE.playSound(GameSound.BUTTON);
+ }
+
if (e.getSource()==cardsbutton) {
displayCards();
}
@@ -1138,6 +1143,9 @@
go("endtrade");
}
else if (gameState==RiskGame.STATE_PLACE_ARMIES) {
+
+ GameSound.INSTANCE.playSound(GameSound.PLACE_ARMY);
+
int quickPlaceCountry = pp.getC1();
if (quickPlaceCountry != PicturePanel.NO_COUNTRY) {
quickPlace.put(myrisk.getGame().getCurrentPlayer(), new Integer(quickPlaceCountry));
Modified: Domination/swingUI/src/net/yura/domination/ui/flashgui/StatsDialog.java
===================================================================
--- Domination/swingUI/src/net/yura/domination/ui/flashgui/StatsDialog.java 2024-02-11 20:01:25 UTC (rev 2509)
+++ Domination/swingUI/src/net/yura/domination/ui/flashgui/StatsDialog.java 2024-02-11 21:56:52 UTC (rev 2510)
@@ -12,6 +12,7 @@
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
+import net.yura.domination.audio.GameSound;
import net.yura.domination.engine.Risk;
import net.yura.domination.guishared.RiskUIUtil;
import net.yura.domination.engine.core.StatType;
@@ -122,6 +123,7 @@
}
public void actionPerformed(ActionEvent a) {
+ GameSound.INSTANCE.playSound(GameSound.BUTTON);
showGraph(StatType.fromOrdinal(Integer.parseInt(a.getActionCommand())));
}
|