mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- added Aroenai's snd_menuvolume submission.
SVN r2600 (trunk)
This commit is contained in:
parent
06a35dea11
commit
ffa58aadbe
2 changed files with 59 additions and 56 deletions
|
@ -205,6 +205,7 @@ EXTERN_CVAR (String, playerclass)
|
|||
EXTERN_CVAR (String, name)
|
||||
EXTERN_CVAR (Int, team)
|
||||
EXTERN_CVAR(Bool, neverswitchonpickup)
|
||||
EXTERN_CVAR(Float, snd_menuvolume)
|
||||
|
||||
extern bool sendpause;
|
||||
extern int flagsvar;
|
||||
|
@ -663,28 +664,28 @@ CCMD (menu_help)
|
|||
CCMD (quicksave)
|
||||
{ // F6
|
||||
//M_StartControlPanel (true);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
|
||||
M_QuickSave();
|
||||
}
|
||||
|
||||
CCMD (quickload)
|
||||
{ // F9
|
||||
//M_StartControlPanel (true);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
|
||||
M_QuickLoad();
|
||||
}
|
||||
|
||||
CCMD (menu_endgame)
|
||||
{ // F7
|
||||
//M_StartControlPanel (true);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
|
||||
M_EndGame(0);
|
||||
}
|
||||
|
||||
CCMD (menu_quit)
|
||||
{ // F10
|
||||
//M_StartControlPanel (true);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
|
||||
M_QuitGame(0);
|
||||
}
|
||||
|
||||
|
@ -1439,7 +1440,7 @@ void M_QuickSaveResponse (int ch)
|
|||
if (ch == 'y')
|
||||
{
|
||||
M_DoSave (quickSaveSlot);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/dismiss", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/dismiss", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1447,7 +1448,7 @@ void M_QuickSave ()
|
|||
{
|
||||
if (!usergame || (players[consoleplayer].health <= 0 && !multiplayer))
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/invalid", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/invalid", snd_menuvolume, ATTN_NONE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1478,7 +1479,7 @@ void M_QuickLoadResponse (int ch)
|
|||
if (ch == 'y')
|
||||
{
|
||||
M_LoadSelect (quickSaveSlot);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/dismiss", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/dismiss", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1981,7 +1982,7 @@ void M_EndGame(int choice)
|
|||
choice = 0;
|
||||
if (!usergame)
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/invalid", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/invalid", snd_menuvolume, ATTN_NONE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2042,7 +2043,7 @@ void M_QuitResponse(int ch)
|
|||
{
|
||||
if (gameinfo.quitSound.IsNotEmpty())
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, gameinfo.quitSound, 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, gameinfo.quitSound, snd_menuvolume, ATTN_NONE);
|
||||
I_WaitVBL (105);
|
||||
}
|
||||
}
|
||||
|
@ -2879,7 +2880,7 @@ void M_StartMessage (const char *string, void (*routine)(int))
|
|||
if (messageRoutine != NULL)
|
||||
{
|
||||
S_StopSound (CHAN_VOICE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/prompt", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/prompt", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2898,7 +2899,7 @@ void M_EndMessage(int key)
|
|||
}
|
||||
SB_state = screen->GetPageCount(); // refresh the status bar
|
||||
BorderNeedRefresh = screen->GetPageCount();
|
||||
S_Sound(CHAN_VOICE | CHAN_UI, "menu/dismiss", 1, ATTN_NONE);
|
||||
S_Sound(CHAN_VOICE | CHAN_UI, "menu/dismiss", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3101,7 +3102,7 @@ bool M_Responder (event_t *ev)
|
|||
if (currentMenu->menuitems[i].alphaKey == ch)
|
||||
{
|
||||
itemOn = i;
|
||||
S_Sound(CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound(CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3337,7 +3338,7 @@ void M_ButtonHandler(EMenuKey key, bool repeat)
|
|||
if (itemOn + 1 >= currentMenu->numitems)
|
||||
itemOn = 0;
|
||||
else itemOn++;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
} while (currentMenu->menuitems[itemOn].status == -1);
|
||||
break;
|
||||
|
||||
|
@ -3347,7 +3348,7 @@ void M_ButtonHandler(EMenuKey key, bool repeat)
|
|||
if (itemOn == 0)
|
||||
itemOn = currentMenu->numitems - 1;
|
||||
else itemOn--;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
} while (currentMenu->menuitems[itemOn].status == -1);
|
||||
break;
|
||||
|
||||
|
@ -3355,7 +3356,7 @@ void M_ButtonHandler(EMenuKey key, bool repeat)
|
|||
if (currentMenu->menuitems[itemOn].routine &&
|
||||
currentMenu->menuitems[itemOn].status == 2)
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
currentMenu->menuitems[itemOn].routine(0);
|
||||
}
|
||||
break;
|
||||
|
@ -3364,7 +3365,7 @@ void M_ButtonHandler(EMenuKey key, bool repeat)
|
|||
if (currentMenu->menuitems[itemOn].routine &&
|
||||
currentMenu->menuitems[itemOn].status == 2)
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
currentMenu->menuitems[itemOn].routine(1);
|
||||
}
|
||||
break;
|
||||
|
@ -3377,12 +3378,12 @@ void M_ButtonHandler(EMenuKey key, bool repeat)
|
|||
if (currentMenu->menuitems[itemOn].status == 2)
|
||||
{
|
||||
currentMenu->menuitems[itemOn].routine(1); // right arrow
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentMenu->menuitems[itemOn].routine(itemOn);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -3602,7 +3603,7 @@ void M_StartControlPanel (bool makeSound, bool wantTop)
|
|||
|
||||
if (makeSound)
|
||||
{
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3946,12 +3947,12 @@ void M_PopMenuStack (void)
|
|||
}
|
||||
drawSkull = MenuStack[MenuStackDepth].drawSkull;
|
||||
++MenuStackDepth;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/backup", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/backup", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
M_ClearMenus ();
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/clear", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/clear", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ EXTERN_CVAR (Int, snd_channels)
|
|||
// defaulted values
|
||||
//
|
||||
CVAR (Float, mouse_sensitivity, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Float, snd_menuvolume, 0.6f, CVAR_ARCHIVE)
|
||||
|
||||
// Show messages has default, 0 = off, 1 = on
|
||||
CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
@ -1274,6 +1275,7 @@ static valueenum_t Resamplers[] =
|
|||
static menuitem_t SoundItems[] =
|
||||
{
|
||||
{ slider, "Sounds volume", {&snd_sfxvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
||||
{ slider, "Menu volume", {&snd_menuvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
||||
{ slider, "Music volume", {&snd_musicvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
||||
{ discrete, "MIDI device", {&snd_mididevice}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
||||
|
@ -1304,7 +1306,7 @@ static menu_t SoundMenu =
|
|||
SoundItems,
|
||||
};
|
||||
|
||||
#define MIDI_DEVICE_ITEM 2
|
||||
#define MIDI_DEVICE_ITEM 3
|
||||
|
||||
/*=======================================
|
||||
*
|
||||
|
@ -1506,13 +1508,13 @@ void M_SizeDisplay (int diff)
|
|||
CCMD (sizedown)
|
||||
{
|
||||
M_SizeDisplay (-1);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
|
||||
CCMD (sizeup)
|
||||
{
|
||||
M_SizeDisplay (1);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
|
||||
// Draws a string in the console font, scaled to the 8x8 cells
|
||||
|
@ -2186,7 +2188,7 @@ void M_OptResponder(event_t *ev)
|
|||
NewBits = BitTranslate[DummyDepthCvar];
|
||||
setmodeneeded = true;
|
||||
testingmode = I_GetTime(false) + 5 * TICRATE;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
SetModesMenu (NewWidth, NewHeight, NewBits);
|
||||
}
|
||||
else if (ev->data1 >= '0' && ev->data1 <= '9')
|
||||
|
@ -2291,7 +2293,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
CurrentMenu->items[CurrentItem].a.selmode = modecol;
|
||||
}
|
||||
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2361,7 +2363,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (CurrentMenu->items[CurrentItem].type == screenres)
|
||||
CurrentMenu->items[CurrentItem].a.selmode = modecol;
|
||||
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2383,7 +2385,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
{
|
||||
++CurrentItem;
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2406,7 +2408,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
{
|
||||
++CurrentItem;
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2444,7 +2446,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
else
|
||||
item->a.cvar->SetGenericRep (newval, CVAR_Float);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_sens:
|
||||
|
@ -2452,7 +2454,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (value.Float < item->b.min)
|
||||
value.Float = item->b.min;
|
||||
SELECTED_JOYSTICK->SetSensitivity(value.Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_slider:
|
||||
|
@ -2485,12 +2487,12 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
{
|
||||
SELECTED_JOYSTICK->SetAxisDeadZone(item->a.joyselection, value.Float);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case palettegrid:
|
||||
SelColorIndex = (SelColorIndex - 1) & 15;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case discretes:
|
||||
|
@ -2535,14 +2537,14 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (item->e.values == Depths)
|
||||
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case ediscrete:
|
||||
value = item->a.cvar->GetGenericRep(CVAR_String);
|
||||
value.String = const_cast<char *>(M_FindPrevVal(value.String, item->e.enumvalues, (int)item->b.numvalues));
|
||||
item->a.cvar->SetGenericRep(value, CVAR_String);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case bitmask:
|
||||
|
@ -2561,21 +2563,21 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
value.Int = (value.Int & ~bmask) | int(item->e.values[cur].value);
|
||||
item->a.cvar->SetGenericRep (value, CVAR_Int);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case inverter:
|
||||
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
||||
value.Float = -value.Float;
|
||||
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_inverter:
|
||||
assert(item->e.joyslidernum == 0);
|
||||
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
||||
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case screenres:
|
||||
|
@ -2599,7 +2601,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
item->a.selmode = col;
|
||||
}
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2641,7 +2643,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
else
|
||||
item->a.cvar->SetGenericRep (newval, CVAR_Float);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_sens:
|
||||
|
@ -2649,7 +2651,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (value.Float > item->c.max)
|
||||
value.Float = item->c.max;
|
||||
SELECTED_JOYSTICK->SetSensitivity(value.Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_slider:
|
||||
|
@ -2682,12 +2684,12 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
{
|
||||
SELECTED_JOYSTICK->SetAxisDeadZone(item->a.joyselection, value.Float);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case palettegrid:
|
||||
SelColorIndex = (SelColorIndex + 1) & 15;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case discretes:
|
||||
|
@ -2732,14 +2734,14 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (item->e.values == Depths)
|
||||
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case ediscrete:
|
||||
value = item->a.cvar->GetGenericRep(CVAR_String);
|
||||
value.String = const_cast<char *>(M_FindNextVal(value.String, item->e.enumvalues, (int)item->b.numvalues));
|
||||
item->a.cvar->SetGenericRep(value, CVAR_String);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case bitmask:
|
||||
|
@ -2758,21 +2760,21 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
value.Int = (value.Int & ~bmask) | int(item->e.values[cur].value);
|
||||
item->a.cvar->SetGenericRep (value, CVAR_Int);
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case inverter:
|
||||
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
||||
value.Float = -value.Float;
|
||||
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case joy_inverter:
|
||||
assert(item->e.joyslidernum == 0);
|
||||
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
||||
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
case screenres:
|
||||
|
@ -2799,7 +2801,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
item->a.selmode = col;
|
||||
}
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2829,7 +2831,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
setmodeneeded = true;
|
||||
NewBits = BitTranslate[DummyDepthCvar];
|
||||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
SetModesMenu (NewWidth, NewHeight, NewBits);
|
||||
}
|
||||
else if ((item->type == more ||
|
||||
|
@ -2841,7 +2843,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
&& item->e.mfunc)
|
||||
{
|
||||
CurrentMenu->lastOn = CurrentItem;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
if (item->type == safemore || item->type == rsafemore)
|
||||
{
|
||||
ActivateConfirm (item->label, item->e.mfunc);
|
||||
|
@ -2876,7 +2878,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
if (item->e.values == Depths)
|
||||
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
||||
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
else if (item->type == control)
|
||||
{
|
||||
|
@ -2889,7 +2891,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
else if (item->type == listelement)
|
||||
{
|
||||
CurrentMenu->lastOn = CurrentItem;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
item->e.lfunc (CurrentItem);
|
||||
}
|
||||
else if (item->type == inverter)
|
||||
|
@ -2897,14 +2899,14 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
||||
value.Float = -value.Float;
|
||||
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
else if (item->type == joy_inverter)
|
||||
{
|
||||
assert(item->e.joyslidernum == 0);
|
||||
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
||||
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
else if (item->type == screenres)
|
||||
{
|
||||
|
@ -2912,7 +2914,7 @@ void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|||
else if (item->type == colorpicker)
|
||||
{
|
||||
CurrentMenu->lastOn = CurrentItem;
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", snd_menuvolume, ATTN_NONE);
|
||||
StartColorPickerMenu (item->label, item->a.colorcvar);
|
||||
}
|
||||
else if (item->type == palettegrid)
|
||||
|
|
Loading…
Reference in a new issue