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

◆ Update() [4/6]

void ScriptedWidgetEventHandler::Update ( )
inlineprotected

Update.

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

35 {
36#ifdef DIAG_DEVELOPER
37 m_Debug = DiagMenu.GetBool( DiagMenuIDs.WEAPON_DEBUG );
38#endif
39 if (!m_Debug) return;
40 if (!m_Player) GetPlayer();
41
42 if ( m_Player && m_Player.IsPlayerSelected() && m_Player.IsRaised() && !m_Player.IsInIronsights() && !GetGame().IsInventoryOpen() )
43 {
44 float sx, sy;
45
47 vector screenSpace = GetGame().GetScreenPos(m_Position);
48
49 m_Root.GetSize(sx, sy);
50 screenSpace[0] = screenSpace[0] - sx/2;
51 screenSpace[1] = screenSpace[1] - sy/2;
52
53 m_Root.SetPos(screenSpace[0], screenSpace[1]);
54 m_Root.Show(m_Visible);
55 }
56 else
57 {
58 m_Root.Show(false);
59 m_Position = vector.Zero;
60 }
61 }
DiagMenuIDs
Определения EDiagMenuIDs.c:2
proto native vector GetScreenPos(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
void GetCrosshairPosition()
Определения ProjectedCrosshair.c:69
Widget m_Root
Определения SizeToChild.c:9
vector m_Position
Определения CTKeyframe.c:7
bool m_Visible
Определения ObjectFollower.c:7
proto native CGame GetGame()

Перекрестные ссылки DiagMenu::GetBool(), GetCrosshairPosition(), GetGame(), GetPlayer(), CGame::GetScreenPos(), m_Debug, m_Player, m_Position, m_Root, m_Visible и vector::Zero.