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

◆ HandleInput()

override void HandleInput ( Input inp)
protected

Handles some VON related input.

Аргументы
inpinput to handle

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

114 {
115#ifdef PLATFORM_MSSTORE
116 // ignore VON-related input if user is in an xbox party
117 if (GetGame().IsInPartyChat())
118 {
119 return;
120 }
121#endif
122#ifdef PLATFORM_XBOX
123 // ignore VON-related input if user is in an xbox party
124 if (g_Game.IsInPartyChat())
125 {
126 return;
127 }
128#endif
129#ifdef PLATFORM_MSSTORE
130 // ignore VON-related input if user is in an xbox party
131 if (g_Game.IsInPartyChat())
132 {
133 return;
134 }
135#endif
136
137 int oldLevel = g_Game.GetVoiceLevel();
138 if (oldLevel == -1) //VoN system not initialized!
139 return;
140
141 int newLevel = -1;
142
143 if (inp.LocalPress_ID(UAVoiceDistanceUp,false))
144 {
145 newLevel = ( oldLevel + 1 ) % ( VoiceLevelShout + 1 );
146 }
147
148 if (inp.LocalPress_ID(UAVoiceDistanceDown,false))
149 {
150 newLevel = oldLevel - 1;
151 if (newLevel < VoiceLevelWhisper) //nah...
152 {
153 newLevel = VoiceLevelShout;
154 }
155 }
156
157 if (newLevel > -1)
158 {
159 g_Game.SetVoiceLevel(newLevel);
160 if (g_Game.GetMission().IsVoNActive()) // icon is already visible, just update the range
161 {
163 }
164 else // Show the icon and let it fade out
165 {
166 int level = g_Game.GetVoiceLevel();
167 ShowVoiceNotification(level, true);
168 }
169 }
170 }
DayZGame g_Game
Определения DayZGame.c:3942
void ShowVoiceNotification(int level, bool fading)
Shows the voice notification.
Определения VONManager.c:58
void UpdateVoiceIcon()
Определения VONManager.c:172
proto native bool LocalPress_ID(int action, bool check_focus=true)
Returns true just in frame, when action was invoked (button was pressed)
DayZGame GetGame()
Определения gameplay.c:636

Перекрестные ссылки g_Game, GetGame(), Input::LocalPress_ID(), VONManagerBase::ShowVoiceNotification() и UpdateVoiceIcon().