Update Menus for Voice Chat!

pull/3/head
Dss0 2022-08-14 00:34:57 +02:00
parent 9f7d9e488d
commit ec19213113
3 changed files with 51 additions and 7 deletions

View File

@ -322,6 +322,9 @@ LANG_ENGLISH "When should the friend status notifications be displayed?"
REFERENCE MPUI_DESC_OPTIONS REFERENCE MPUI_DESC_OPTIONS
LANG_ENGLISH "Set your game options." LANG_ENGLISH "Set your game options."
REFERENCE MPUI_ENABLE_VOICE_CHAT
LANG_ENGLISH "Enable Voice Chat"
REFERENCE MPUI_DESC_QUIT REFERENCE MPUI_DESC_QUIT
LANG_ENGLISH "Quit the game." LANG_ENGLISH "Quit the game."

View File

@ -78,4 +78,7 @@ menuDef
PC_OPTIONS_DVARSLIDER_RAW(0, "@MENU_MASTER_VOLUME", "snd_volume", 0, 1, 0, ;, ;, ;, when(0), 1, 1) PC_OPTIONS_DVARSLIDER_RAW(0, "@MENU_MASTER_VOLUME", "snd_volume", 0, 1, 0, ;, ;, ;, when(0), 1, 1)
PC_OPTIONS_STRLIST_RAW(1, "@MENU_SPEAKER_CONFIG", "ui_outputConfig", {"@MENU_WINDOWS_DEFAULT"; "Windows default"; "@MENU_MONO"; "Mono"; "@MENU_STEREO"; "Stereo"; "@MENU_FOUR_SPEAKERS"; "4 speakers"; "@MENU_FIVE_ONE_SPEAKERS"; "5.1 speakers"}, setLocalVarBool "ui_showAudioApply" (1);, ;, when((dvarBool("cl_ingame") || dvarBool("sv_running") || inlobby())), 1) PC_OPTIONS_STRLIST_RAW(1, "@MENU_SPEAKER_CONFIG", "ui_outputConfig", {"@MENU_WINDOWS_DEFAULT"; "Windows default"; "@MENU_MONO"; "Mono"; "@MENU_STEREO"; "Stereo"; "@MENU_FOUR_SPEAKERS"; "4 speakers"; "@MENU_FIVE_ONE_SPEAKERS"; "5.1 speakers"}, setLocalVarBool "ui_showAudioApply" (1);, ;, when((dvarBool("cl_ingame") || dvarBool("sv_running") || inlobby())), 1)
PC_OPTIONS_SEPERATOR(1)
PC_OPTIONS_DVARYESNO(2, "@MPUI_ENABLE_VOICE_CHAT", "cl_voice", ;, when(0))
PC_OPTIONS_KEYBINDING(3, "@MENU_VOICE_CHAT_BUTTON", "+talk")
} }

View File

@ -451,7 +451,47 @@
} }
itemDef itemDef
{ {
rect 0 68 216 1 1 1 name "game_options"
rect -64 68 336 20 1 1
visible 1
group "mw2_button"
style 1
forecolor 1 1 1 1
disablecolor 0.6 0.55 0.55 1
background "menu_button_selection_bar"
type 1
textfont 3
textalign 6
textalignx -60
textscale 0.375
text "@MPUI_MUTE_PLAYERS"
action
{
play "mouse_click";
close self;
open "muteplayer";
}
onFocus
{
play "mouse_over";
if ( dvarstring( "gameMode" ) != "mp" )
{
setItemColor "mw2_button" backcolor 0 0 0 0;
}
setItemColor self backcolor 0 0 0 1;
setLocalVarBool "ui_menuAButton" ( 1 );
setLocalVarFloat "ui_popupYPos" ( getfocuseditemy( ) );
}
leaveFocus
{
setItemColor self backcolor 0 0 0 "0.0";
setLocalVarString "ui_hint_text" ( "@NULL_EMPTY" );
setLocalVarBool "ui_menuAButton" ( 0 );
}
}
itemDef
{
rect 0 88 216 1 1 1
decoration decoration
visible 1 visible 1
style 3 style 3
@ -462,7 +502,7 @@
itemDef itemDef
{ {
name "game_options" name "game_options"
rect -64 68 336 20 1 1 rect -64 88 336 20 1 1
visible 1 visible 1
group "mw2_button" group "mw2_button"
style 1 style 1
@ -503,7 +543,7 @@
itemDef itemDef
{ {
name "game_options" name "game_options"
rect -64 88 336 20 1 1 rect -64 108 336 20 1 1
visible 1 visible 1
group "mw2_button" group "mw2_button"
style 1 style 1
@ -515,14 +555,12 @@
textalign 6 textalign 6
textalignx -60 textalignx -60
textscale 0.375 textscale 0.375
//text "@MPUI_MUTE_PLAYERS"
disabled when(dvarBool("party_host")) disabled when(dvarBool("party_host"))
text "@MENU_ADD_TO_FAVORITES" text "@MENU_ADD_TO_FAVORITES"
action action
{ {
play "mouse_click"; play "mouse_click";
close self; close self;
//open "muteplayer";
uiScript "CreateCurrentServerFavorite"; uiScript "CreateCurrentServerFavorite";
} }
onFocus onFocus
@ -546,7 +584,7 @@
itemDef itemDef
{ {
name "game_endgame" name "game_endgame"
rect -64 108 336 20 1 1 rect -64 128 336 20 1 1
visible 1 visible 1
group "mw2_button" group "mw2_button"
style 1 style 1
@ -586,7 +624,7 @@
itemDef itemDef
{ {
name "game_leavegame" name "game_leavegame"
rect -64 108 336 20 1 1 rect -64 128 336 20 1 1
visible 1 visible 1
group "mw2_button" group "mw2_button"
style 1 style 1