51 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_map.layout");
52 m_Hud = IngameHud.Cast(
g_Game.GetMission().GetHud());
67 m_GPSMarker = layoutRoot.FindAnyWidget(
"GPSMarkerCircle");
68 m_GPSMarkerArrow = ImageWidget.Cast(layoutRoot.FindAnyWidget(
"GPSMarkerArrow"));
74 m_ToolsGPSXText = TextWidget.Cast(layoutRoot.FindAnyWidget(
"Tools_GPS_X_Value"));
75 m_ToolsGPSYText = TextWidget.Cast(layoutRoot.FindAnyWidget(
"Tools_GPS_Y_Value"));
82 float canvasHeight = 0;
90 if (player && !player.GetLastMapInfo(scale, mapPosition))
92 vector tempPosition =
g_Game.ConfigGetVector(
string.Format(
"CfgWorlds %1 centerPosition",
g_Game.GetWorldName()));
94 mapPosition =
Vector(tempPosition[0], tempPosition[1], tempPosition[2]);
100 m_HasCompass =
false;
141 if ((!m_HasGPS && !m_HasCompass) || !
CfgGameplayHandler.GetMapDisplayNavigationInfo())
152 m_Hud.ShowHudUI(
false);
153 m_Hud.ShowQuickbarUI(
false);
221 super.Update(timeslice);
237 float rulerMaxDistance;
249 vector rot = player.GetYawPitchRoll();
250 float angle =
Math.Round(rot[0]);
268 sizeX =
Math.Round(sizeX);
269 sizeY =
Math.Round(sizeY);
270 m_GPSMarker.SetPos(mapPos[0] - sizeX/2, mapPos[1] - sizeY/2);
295 bool isClosedWithShortcut =
CfgGameplayHandler.GetMapIgnoreMapOwnership() &&
GetUApi().GetInputByID(UAMapToggle).LocalPress();
296 if (!
m_IsOpenning && (
GetUApi().GetInputByID(UAUIBack).LocalPress() || isClosedWithShortcut))
413 float sizeYShift = 8;
415 int lineColor = FadeColors.BLACK;
419 lineColor = FadeColors.BLACK;
422 lineColor = FadeColors.LIGHT_GREY;
proto native vector Vector(float x, float y, float z)
Vector constructor from components.