From: fgsfds Date: Tue, 18 Feb 2020 20:08:40 +0000 (+0300) Subject: GUI: play scroll sound when using switches X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d8e9a85e92260e0982cddfecb66c9dbc940f8eb1;p=d2df-sdl.git GUI: play scroll sound when using switches --- diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index 0c7f126..3181e69 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -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;