DayZ 1.27
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_XBOX
116 // ignore VON-related input if user is in an xbox party
117 if (GetGame().IsInPartyChat())
118 {
119 return;
120 }
121#endif
122 int oldLevel = GetGame().GetVoiceLevel();
123 if (oldLevel == -1) //VoN system not initialized!
124 return;
125
126 int newLevel = -1;
127
128 if (inp.LocalPress_ID(UAVoiceDistanceUp,false))
129 {
130 newLevel = ( oldLevel + 1 ) % ( VoiceLevelShout + 1 );
131 }
132
133 if (inp.LocalPress_ID(UAVoiceDistanceDown,false))
134 {
135 newLevel = oldLevel - 1;
136 if (newLevel < VoiceLevelWhisper) //nah...
137 {
138 newLevel = VoiceLevelShout;
139 }
140 }
141
142 if (newLevel > -1)
143 {
144 CGame game = GetGame();
145 game.SetVoiceLevel(newLevel);
146 if (game.GetMission().IsVoNActive()) // icon is already visible, just update the range
147 {
149 }
150 else // Show the icon and let it fade out
151 {
152 int level = GetGame().GetVoiceLevel();
153 ShowVoiceNotification(level, true);
154 }
155 }
156 }
void ShowVoiceNotification(int level, bool fading)
Shows the voice notification.
Определения VONManager.c:58
void UpdateVoiceIcon()
Определения VONManager.c:158
proto native int GetVoiceLevel(Object player=null)
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto native void SetVoiceLevel(int level)
Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto native Mission GetMission()
Определения DayZGame.c:890
proto native bool LocalPress_ID(int action, bool check_focus=true)
Returns true just in frame, when action was invoked (button was pressed)
bool IsVoNActive()
Определения gameplay.c:816
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetMission(), CGame::GetVoiceLevel(), Mission::IsVoNActive(), Input::LocalPress_ID(), CGame::SetVoiceLevel(), VONManagerBase::ShowVoiceNotification() и UpdateVoiceIcon().