43 if (
g_Game.IsMissionMainMenu())
49 mission.GetMicrophoneIcon().Show(
false);
50 mission.HideVoiceLevelWidgets();
60 if (
g_Game.IsMissionMainMenu())
66 ImageWidget micIcon =
mission.GetMicrophoneIcon();
67 WidgetFadeTimer micTimer =
mission.GetMicWidgetFadeTimer();
73 micIcon.SetAlpha(1.0);
78 micTimer.FadeOut(micIcon, 3.0);
82 for(
int n = 0; n < voiceLeveWidgets.Count(); n++ )
84 int voiceKey = voiceLeveWidgets.GetKey(n);
85 ImageWidget voiceWidget = voiceLeveWidgets.Get(n);
88 WidgetFadeTimer timer = voiceLevelTimers.Get(n);
92 if ( voiceKey <= level )
94 voiceWidget.SetAlpha(1.0);
95 voiceWidget.Show(
true);
99 timer.FadeOut(voiceWidget, 3.0);
104 voiceWidget.Show(
false);
115#ifdef PLATFORM_MSSTORE
124 if (
g_Game.IsInPartyChat())
129#ifdef PLATFORM_MSSTORE
131 if (
g_Game.IsInPartyChat())
137 int oldLevel =
g_Game.GetVoiceLevel();
143 if (inp.LocalPress_ID(UAVoiceDistanceUp,
false))
145 newLevel = ( oldLevel + 1 ) % ( VoiceLevelShout + 1 );
148 if (inp.LocalPress_ID(UAVoiceDistanceDown,
false))
150 newLevel = oldLevel - 1;
151 if (newLevel < VoiceLevelWhisper)
153 newLevel = VoiceLevelShout;
159 g_Game.SetVoiceLevel(newLevel);
160 if (
g_Game.GetMission().IsVoNActive())
166 int level =
g_Game.GetVoiceLevel();
172 private void UpdateVoiceIcon()
175 int rangeLevel =
g_Game.GetVoiceLevel();
181 if (VONManager.IsVoiceThresholdMinimum())
224 if (!VONManager.IsVoiceThresholdMinimum())
237 if (!VONManager.IsVoiceThresholdMinimum())
253 mission.SetVoNActive(vonStateParams.param1);
271 if (
Class.CastTo(vonStartParams, params))
273 GetDayZGame().AddVoiceNotification(vonStartParams);
281 if (
Class.CastTo(vonStopParams, params))
283 GetDayZGame().RemoveVoiceNotification(vonStopParams);
323 static void CleanupInstance()
333 static bool IsVONToggled()
335 return m_VONManager.IsVonToggled();
342 static bool IsVoiceThresholdMinimum()
344 GameOptions gameOptions =
new GameOptions();
345 NumericOptionsAccess noa;
346 Class.CastTo(noa, gameOptions.GetOptionByType(
OptionAccessType.AT_OPTIONS_VON_THRESHOLD_SLIDER ));
348 return noa.ReadValue() <=
g_Game.GetSoundScene().GetSilenceThreshold();
Super root of all classes in Enforce script.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
ScriptInvoker Class provide list of callbacks usage:
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
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.
ref ScriptInvoker m_OnPartyChatChangedEvent
VONManagerBase Managed VONManagerImplementation()
void ~VONManagerImplementation()
ref ScriptInvoker m_OnVonStateEvent