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

◆ HandleInput()

override void HandleInput ( Input inp)
protected

Handles some VON related input.

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

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

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