Add fixes to ui menu by Ensiform and DevHC (#5062)

This commit is contained in:
Thilo Schulz 2011-07-07 16:12:53 +00:00
parent 74e538ffcf
commit 7666c2f54c
4 changed files with 50 additions and 23 deletions

View file

@ -798,6 +798,8 @@ static sfxHandle_t SpinControl_Key( menulist_s *s, int key )
sound = 0;
switch (key)
{
case K_KP_RIGHTARROW:
case K_RIGHTARROW:
case K_MOUSE1:
s->curvalue++;
if (s->curvalue >= s->numitems)
@ -807,24 +809,10 @@ static sfxHandle_t SpinControl_Key( menulist_s *s, int key )
case K_KP_LEFTARROW:
case K_LEFTARROW:
if (s->curvalue > 0)
{
s->curvalue--;
sound = menu_move_sound;
}
else
sound = menu_buzz_sound;
break;
case K_KP_RIGHTARROW:
case K_RIGHTARROW:
if (s->curvalue < s->numitems-1)
{
s->curvalue++;
sound = menu_move_sound;
}
else
sound = menu_buzz_sound;
s->curvalue--;
if (s->curvalue < 0)
s->curvalue = s->numitems-1;
sound = menu_move_sound;
break;
}