Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Commit

Permalink
Two sounds for menu scroller
Browse files Browse the repository at this point in the history
MENU_MOVE sound separated to SCROLL_ADD and SCROLL_SUB sounds
  • Loading branch information
binarymaster committed Nov 8, 2014
1 parent 4be9982 commit dd72ac5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions DF Sources/g_gui.pas
Expand Up @@ -25,12 +25,13 @@ interface
MENU_HSPACE = 32;
MENU_CLICKSOUND = 'MENU_SELECT';
MENU_CHANGESOUND = 'MENU_CHANGE';
MENU_MOVESOUND = 'MENU_MOVE';
MENU_MARKERDELAY = 24;
SCROLL_LEFT = 'SCROLL_LEFT';
SCROLL_RIGHT = 'SCROLL_RIGHT';
SCROLL_MIDDLE = 'SCROLL_MIDDLE';
SCROLL_MARKER = 'SCROLL_MARKER';
SCROLL_ADDSOUND = 'SCROLL_ADD';
SCROLL_SUBSOUND = 'SCROLL_SUB';
EDIT_LEFT = 'EDIT_LEFT';
EDIT_RIGHT = 'EDIT_RIGHT';
EDIT_MIDDLE = 'EDIT_MIDDLE';
Expand Down Expand Up @@ -1923,13 +1924,13 @@ procedure TGUIScroll.OnMessage(var Msg: TMessage);
VK_LEFT: if FValue > 0 then
begin
Dec(FValue);
g_Sound_PlayEx(MENU_MOVESOUND);
g_Sound_PlayEx(SCROLL_SUBSOUND);
if @FOnChangeEvent <> nil then FOnChangeEvent(Self);
end;
VK_RIGHT: if FValue < FMax then
begin
Inc(FValue);
g_Sound_PlayEx(MENU_MOVESOUND);
g_Sound_PlayEx(SCROLL_ADDSOUND);
if @FOnChangeEvent <> nil then FOnChangeEvent(Self);
end;
end;
Expand Down
7 changes: 4 additions & 3 deletions DF Sources/g_gui_en.pas
Expand Up @@ -24,12 +24,13 @@ interface
MENU_HSPACE = 32;
MENU_CLICKSOUND = 'MENU_SELECT';
MENU_CHANGESOUND = 'MENU_CHANGE';
MENU_MOVESOUND = 'MENU_MOVE';
MENU_MARKERDELAY = 24;
SCROLL_LEFT = 'SCROLL_LEFT';
SCROLL_RIGHT = 'SCROLL_RIGHT';
SCROLL_MIDDLE = 'SCROLL_MIDDLE';
SCROLL_MARKER = 'SCROLL_MARKER';
SCROLL_ADDSOUND = 'SCROLL_ADD';
SCROLL_SUBSOUND = 'SCROLL_SUB';
EDIT_LEFT = 'EDIT_LEFT';
EDIT_RIGHT = 'EDIT_RIGHT';
EDIT_MIDDLE = 'EDIT_MIDDLE';
Expand Down Expand Up @@ -1762,13 +1763,13 @@ procedure TGUIScroll.OnMessage(var Msg: TMessage);
VK_LEFT: if FValue > 0 then
begin
Dec(FValue);
g_Sound_PlayEx(MENU_MOVESOUND);
g_Sound_PlayEx(SCROLL_SUBSOUND);
if @FOnChangeEvent <> nil then FOnChangeEvent(Self);
end;
VK_RIGHT: if FValue < FMax then
begin
Inc(FValue);
g_Sound_PlayEx(MENU_MOVESOUND);
g_Sound_PlayEx(SCROLL_ADDSOUND);
if @FOnChangeEvent <> nil then FOnChangeEvent(Self);
end;
end;
Expand Down
6 changes: 4 additions & 2 deletions DF Sources/g_menu.pas
Expand Up @@ -833,7 +833,8 @@ procedure MenuLoadData();
g_Sound_CreateWADEx('MENU_OPEN', GameWAD+':SOUNDS\MENUOPEN');
g_Sound_CreateWADEx('MENU_CLOSE', GameWAD+':SOUNDS\MENUCLOSE');
g_Sound_CreateWADEx('MENU_CHANGE', GameWAD+':SOUNDS\MENUCHANGE');
g_Sound_CreateWADEx('MENU_MOVE', GameWAD+':SOUNDS\MENUMOVE');
g_Sound_CreateWADEx('SCROLL_ADD', GameWAD+':SOUNDS\SCROLLADD');
g_Sound_CreateWADEx('SCROLL_SUB', GameWAD+':SOUNDS\SCROLLSUB');
g_Sound_CreateWADEx('SOUND_PLAYER_FALL', GameWAD+':SOUNDS\FALL');
end;

Expand Down Expand Up @@ -871,7 +872,8 @@ procedure MenuFreeData();
g_Sound_Delete('MENU_OPEN');
g_Sound_Delete('MENU_CLOSE');
g_Sound_Delete('MENU_CHANGE');
g_Sound_Delete('MENU_MOVE');
g_Sound_Delete('SCROLL_ADD');
g_Sound_Delete('SCROLL_SUB');
g_Sound_Delete('SOUND_PLAYER_FALL');
end;

Expand Down

0 comments on commit dd72ac5

Please sign in to comment.