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

◆ UpdataControllerInput()

void UpdataControllerInput ( )
protected

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

641 {
642 Input input = GetGame().GetInput();
643
644 //Controller radial
645 float angle;
646 float tilt;
647 input.GetGamepadThumbDirection(GamepadButton.THUMB_RIGHT, angle, tilt);
648 angle = NormalizeInvertAngle(angle * Math.RAD2DEG);
649
650 m_ControllerAngle = angle;
651 m_ControllerTilt = tilt;
652 m_ControllerTimout = 0; //reset controller timeout
653
654 //Controller buttons
655 //Select (A,cross)
656 if (m_SelectInputWrapper.InputP().LocalPress())
657 {
658 GetGame().GameScript.CallFunction(m_RegisteredClass, "OnControllerPressSelect", NULL, m_SelectedObject);
659 }
660
661 //Back (B,circle)
662 if (m_BackInputWrapper.InputP().LocalPress())
663 {
664 GetGame().GameScript.CallFunction(m_RegisteredClass, "OnControllerPressBack", NULL, m_SelectedObject);
665 }
666 }
UAIDWrapper m_SelectInputWrapper
Определения RadialMenu.c:31
UAIDWrapper m_BackInputWrapper
Определения RadialMenu.c:32
Widget m_SelectedObject
Определения RadialMenu.c:16
float NormalizeInvertAngle(float angle)
Определения RadialMenu.c:627
ref UIScriptedMenu m_RegisteredClass
Определения RadialMenu.c:54
float m_ControllerTilt
Определения RadialMenu.c:34
float m_ControllerAngle
Определения RadialMenu.c:33
int m_ControllerTimout
Определения RadialMenu.c:37
ScriptModule GameScript
Определения Game.c:12
proto native Input GetInput()
proto bool GetGamepadThumbDirection(GamepadButton thumbButton, out float angle, out float value)
return true if was deflected button.
Определения input.c:11
Определения EnMath.c:7
proto native CGame GetGame()
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
GamepadButton
Определения EnSystem.c:341
static const float RAD2DEG
Определения EnMath.c:16

Перекрестные ссылки ScriptModule::CallFunction(), CGame::GameScript, GetGame(), Input::GetGamepadThumbDirection(), CGame::GetInput(), m_BackInputWrapper, m_ControllerAngle, m_ControllerTilt, m_ControllerTimout, m_RegisteredClass, m_SelectedObject, m_SelectInputWrapper, NormalizeInvertAngle() и Math::RAD2DEG.

Используется в Update().