DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ShowVoiceNotification()

override void ShowVoiceNotification ( int level,
bool fading )
protected

Shows the voice notification.

Аргументы
levelthe loudness of the player voice. 0 = whisper, 1 = normal, 2 = shout
fadingspecifies whether icon should slowly fade to invisibility after being displayed

См. определение в файле VONManager.c строка 58

59 {
60 if (GetGame().IsMissionMainMenu())
61 {
62 return;
63 }
64
66 ImageWidget micIcon = mission.GetMicrophoneIcon();
67 WidgetFadeTimer micTimer = mission.GetMicWidgetFadeTimer();
68 map<int,ImageWidget> voiceLeveWidgets = mission.GetVoiceLevelWidgets();
69 map<int,ref WidgetFadeTimer> voiceLevelTimers = mission.GetVoiceLevelTimers();
70
71 // microphone icon
72 micTimer.Stop();
73 micIcon.SetAlpha(1.0);
74 micIcon.Show(true);
75
76 if (fading)
77 {
78 micTimer.FadeOut(micIcon, 3.0);
79 }
80
81 // range icons
82 for( int n = 0; n < voiceLeveWidgets.Count(); n++ )
83 {
84 int voiceKey = voiceLeveWidgets.GetKey(n);
85 ImageWidget voiceWidget = voiceLeveWidgets.Get(n);
86
87 // stop fade timer since it will be refreshed
88 WidgetFadeTimer timer = voiceLevelTimers.Get(n);
89 timer.Stop();
90
91 // show widgets according to the level
92 if ( voiceKey <= level )
93 {
94 voiceWidget.SetAlpha(1.0); // reset from possible previous fade out
95 voiceWidget.Show(true);
96
97 if (fading)
98 {
99 timer.FadeOut(voiceWidget, 3.0);
100 }
101 }
102 else
103 {
104 voiceWidget.Show(false);
105 }
106 }
107 }
map
Определения ControlsXboxNew.c:4
Mission mission
Определения DisplayStatus.c:28
proto native Mission GetMission()
Mission class.
Определения gameplay.c:687
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetMission() и mission.