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

◆ OnMouseButtonDown()

override bool ScriptConsoleSoundsTab::OnMouseButtonDown ( Widget w,
int x,
int y,
int button )
inlineprotected

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

337 {
338 super.OnMouseButtonDown(w,x,y,button);
339
340 if (w == m_DebugMapWidget)
341 {
342 if (button == 0)
343 {
345 int mouseX, mouseY;
346 GetMousePos(mouseX,mouseY);
347 vector mousePos, worldPos;
348 mousePos[0] = mouseX;
349 mousePos[1] = mouseY;
350 worldPos = m_DebugMapWidget.ScreenToMap(mousePos);
351 worldPos[1] = GetGame().SurfaceY(worldPos[0], worldPos[2]);
352
353 SetMapPos(worldPos);
354 }
355 else if (button == 1 && GetGame().GetPlayer())
356 {
357 SetMapPos(GetGame().GetPlayer().GetWorldPosition());
358 }
359 }
360 return true;
361 }
Icon x
Icon y
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native float SurfaceY(float x, float z)
MapWidget m_DebugMapWidget
Определения ScriptConsoleSoundsTab.c:27
void SetMapPos(vector pos)
Определения ScriptConsoleSoundsTab.c:289
bool m_PlayerPosRefreshBlocked
Определения ScriptConsoleSoundsTab.c:3
proto native CGame GetGame()
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки GetGame(), GetMousePos(), GetPlayer(), m_DebugMapWidget, m_PlayerPosRefreshBlocked, SetMapPos(), CGame::SurfaceY(), x и y.