]> git.zerfleddert.de Git - micropolis/blobdiff - res/micropolis.tcl
search sounds and player in $ResourceDir
[micropolis] / res / micropolis.tcl
index 250ebf25839529b3132f9bedc9236e9b7e6b5e16..6c6c03a82b50775fb12b949039dca34bd3942a31 100644 (file)
@@ -939,11 +939,11 @@ proc UISetChannelVolume {win chan vol} {
 
 proc EchoPlaySound {soundspec} {
   # Temporary workaround to tell Python Sugar app to play sound.
-  global Sound
+  global Sound ResourceDir
   if {$Sound} {
     #echo PlaySound [lindex $soundspec 0]
     signal ignore SIGCHLD
-    exec res/sounds/player res/sounds/[string tolower [lindex $soundspec 0]].wav &
+    exec "${ResourceDir}/sounds/player" "${ResourceDir}/sounds/[string tolower [lindex $soundspec 0]].wav" &
   }
 }
 
@@ -5248,8 +5248,14 @@ proc DoLeaveGame {head} {
 
 
 proc UILoseGame {} {
-  UIPickScenarioMode
+  global Messages
   UIShowPicture 200
+  sim Pause
+  AskQuestion [Color . #ff0000 #ffffff] [lindex $Messages(200) 1] \
+    [lindex $Messages(200) 2] \
+    ""\
+    ""\
+    "{Ok} SelectCity.Yes {UIPickScenarioMode}"
 }
 
 
Impressum, Datenschutz