46 if (
g_Game.IsMissionMainMenu())
52 mission.GetMicrophoneIcon().Show(
false);
53 mission.HideVoiceLevelWidgets();
63 if (
g_Game.IsMissionMainMenu())
69 ImageWidget micIcon =
mission.GetMicrophoneIcon();
70 WidgetFadeTimer micTimer =
mission.GetMicWidgetFadeTimer();
76 micIcon.SetAlpha(1.0);
81 micTimer.FadeOut(micIcon, 3.0);
85 for(
int n = 0; n < voiceLeveWidgets.Count(); n++ )
87 int voiceKey = voiceLeveWidgets.GetKey(n);
88 ImageWidget voiceWidget = voiceLeveWidgets.Get(n);
91 WidgetFadeTimer timer = voiceLevelTimers.Get(n);
95 if ( voiceKey <= level )
97 voiceWidget.SetAlpha(1.0);
98 voiceWidget.Show(
true);
102 timer.FadeOut(voiceWidget, 3.0);
107 voiceWidget.Show(
false);
118#ifdef PLATFORM_MSSTORE
127 if (
g_Game.IsInPartyChat())
132#ifdef PLATFORM_MSSTORE
134 if (
g_Game.IsInPartyChat())
140 int oldLevel =
g_Game.GetVoiceLevel();
148 newLevel = ( oldLevel + 1 ) % ( VoiceLevelShout + 1 );
153 newLevel = oldLevel - 1;
154 if (newLevel < VoiceLevelWhisper)
156 newLevel = VoiceLevelShout;
162 g_Game.SetVoiceLevel(newLevel);
163 if (
g_Game.GetMission().IsVoNActive())
169 int level =
g_Game.GetVoiceLevel();
178 int rangeLevel =
g_Game.GetVoiceLevel();
256 mission.SetVoNActive(vonStateParams.param1);
276 GetDayZGame().AddVoiceNotification(vonStartParams);
286 GetDayZGame().RemoveVoiceNotification(vonStopParams);
348 NumericOptionsAccess noa;
351 return noa.ReadValue() <=
g_Game.GetSoundScene().GetSilenceThreshold();
ref ScriptInvoker m_OnPartyChatChangedEvent
VONManagerBase Managed VONManagerImplementation()
void ~VONManagerImplementation()
ref ScriptInvoker m_OnVonStateEvent
Super root of all classes in Enforce script.
proto native OptionsAccess GetOptionByType(int accessType)
Get option by AccessType.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
ScriptInvoker Class provide list of callbacks usage:
static bool IsVONToggled()
Specifies whether VON mode is toggled or not.
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
static void CleanupInstance()
Uninitializes VONManager, runs when user disconnects from server.
static ref VONManagerBase m_VONManager
static void Init()
Initializes VONManager, runs when user first connects to a server.
static bool IsVoiceThresholdMinimum()
Specifies whether user's voice activation threshold value is equal to the minimum voice activation th...
void OnEvent(EventType eventTypeId, Param params)
void HandleInput(Input inp)
void ShowVoiceNotification(int level, bool fading)
void HideVoiceNotification()
void OnVOIPThresholdChanged()
ref ScriptInvoker m_OnVonStateEvent
ref ScriptInvoker m_OnPartyChatChangedEvent
Manager class which handles Voice-over-network functionality while player is connected to a server.
Param2< string, string > VONStartSpeakingEventParams
player name, player id
const EventType PartyChatStatusChangedEventTypeID
no params
Param2< bool, bool > VONStateEventParams
listening, toggled
Param2< string, string > VONStopSpeakingEventParams
player name, player id
const EventType VONStartSpeakingEventTypeID
params: VONStartSpeakingEventParams
const EventType VONStateEventTypeID
params: VONStateEventParams
const EventType VONUserStoppedTransmittingAudioEventTypeID
no params
const EventType VONUserStartedTransmittingAudioEventTypeID
no params
const EventType VONStopSpeakingEventTypeID
params: VONStopSpeakingEventParams
const EventType MPSessionPlayerReadyEventTypeID
no params
OptionAccessType
C++ OptionAccessType.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.