8 protected bool m_HasCompass
9 protected bool m_HasGPS
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"));
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;
152 m_Hud.ShowHudUI(
false);
153 m_Hud.ShowQuickbarUI(
false);
170 super.InitMapItem(item);
187 super.OnClick(w,
x,
y, button);
189 switch (w.GetUserID())
201 super.OnKeyPress(w,
x,
y, key);
208 #ifdef PLATFORM_CONSOLE
221 super.Update(timeslice);
237 float rulerMaxDistance;
249 vector rot = player.GetYawPitchRoll();
270 m_GPSMarker.SetPos(mapPos[0] - sizeX/2, mapPos[1] - sizeY/2);
296 if (!
m_IsOpenning && (
GetUApi().GetInputByID(UAUIBack).LocalPress() || isClosedWithShortcut))
312 m_Map.InsertMarker(pos,
"",color,icon);
325 for (
int i = 0; i <
m_Map.GetMarkerArray().
Count(); i++)
327 marker =
m_Map.GetMarkerArray().Get(i);
336 m_Map.SyncMapMarkers();
343 player.SetMapClosingSyncSet(
false);
348 m_Hud.ShowHudUI(
true);
349 m_Hud.ShowQuickbarUI(
true);
356 g_Game.GetMission().RemoveActiveInputExcludes({
"map"});
360 g_Game.GetMission().RemoveActiveInputExcludes({
"loopedactions"});
363 g_Game.GetMission().RemoveActiveInputRestriction(EInputRestrictors.MAP);
413 float sizeYShift = 8;
415 int lineColor = FadeColors.BLACK;
419 lineColor = FadeColors.BLACK;
422 lineColor = FadeColors.LIGHT_GREY;
449 else if (num >= 100 && num <= 900)
472 string text =
string.Empty;
478 toolbarText.SetText(text);
483 bool toolbarShow =
false;
484 #ifdef PLATFORM_CONSOLE
485 toolbarShow = !
g_Game.GetInput().IsEnabledMouseAndKeyboard() ||
g_Game.GetInput().GetCurrentInputDevice() ==
EInputDeviceType.CONTROLLER;
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
static bool GetUse3DMap()
static bool GetMapDisplayPlayerPosition()
static bool GetMapDisplayNavigationInfo()
static bool GetMapIgnoreMapOwnership()
static bool GetMapIgnoreNavItemsOwnership()
static string GetMarkerTypeFromID(int id)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Floor(float f)
Returns floor of value.
static proto float Round(float f)
Returns mathematical round of value.
static proto float Ceil(float f)
Returns ceil of value.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.