DEADSOFTWARE

GUI: play scroll sound when using switches
authorfgsfds <pvt.fgsfds@gmail.com>
Tue, 18 Feb 2020 20:08:40 +0000 (23:08 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Tue, 18 Feb 2020 20:08:40 +0000 (23:08 +0300)
src/game/g_gui.pas

index 0c7f12659e2584350039ce93d1ec01da7f8556c5..3181e6969102e55d77b1be621b7e46ab32158a79 100644 (file)
@@ -2226,21 +2226,25 @@ begin
           else
             FIndex := 0;
 
+          g_Sound_PlayEx(SCROLL_ADDSOUND);
+
           if @FOnChangeEvent <> nil then
             FOnChangeEvent(Self);
         end;
 
-    IK_LEFT, IK_KPLEFT, VK_LEFT,
-    JOY0_LEFT, JOY1_LEFT, JOY2_LEFT, JOY3_LEFT:
-      begin
-        if FIndex > 0 then
-          Dec(FIndex)
-        else
-          FIndex := High(FItems);
+      IK_LEFT, IK_KPLEFT, VK_LEFT,
+      JOY0_LEFT, JOY1_LEFT, JOY2_LEFT, JOY3_LEFT:
+        begin
+          if FIndex > 0 then
+            Dec(FIndex)
+          else
+            FIndex := High(FItems);
 
-        if @FOnChangeEvent <> nil then
-          FOnChangeEvent(Self);
-      end;
+          g_Sound_PlayEx(SCROLL_SUBSOUND);
+
+          if @FOnChangeEvent <> nil then
+            FOnChangeEvent(Self);
+        end;
     end;
   end;
 end;