Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
mapmenu.c
Go to the documentation of this file.
1
class
MapMenu
extends
UIScriptedMenu
2
{
3
protected
const
string
COORD_FORMAT
=
"%1.%2%3"
;
4
protected
const
int
SCALE_RULER_LINE_WIDTH
= 8;
5
protected
const
int
SCALE_RULER_NUM_SEGMENTS
= 10;
6
7
protected
bool
m_WasChanged
;
8
protected
bool
m_HasCompass
9
protected
bool
m_HasGPS
10
protected
bool
m_IsOpenning
;
11
12
protected
float
m_ToolScaleCellSizeCanvasWidth
;
13
protected
float
m_ToolsContainerPos0
[2];
14
15
protected
ref IngameHud
m_Hud
;
16
protected
ref
MapHandler
m_MapMenuHandler
;
17
protected
ref
MapWidget
m_MapWidgetInstance
;
18
protected
ref SizeToChild
m_LegendResizer
;
19
20
protected
Widget
m_MapToolsContainer
;
21
protected
ImageWidget
m_Images
;
22
protected
Widget
m_GPSMarker
;
23
protected
ImageWidget
m_GPSMarkerArrow
;
24
protected
Widget
m_UpperLegendContainer
;
25
protected
Widget
m_ToolsCompassBase
;
26
protected
ImageWidget
m_ToolsCompassArrow
;
27
protected
TextWidget
m_ToolsCompassAzimuth
;
28
protected
TextWidget
m_ToolsScaleContourText
;
29
protected
TextWidget
m_ToolsGPSElevationText
;
30
protected
TextWidget
m_ToolsGPSXText
;
31
protected
TextWidget
m_ToolsGPSYText
;
32
protected
TextWidget
m_ToolsScaleCellSizeText
;
33
protected
CanvasWidget
m_ToolsScaleCellSizeCanvas
;
34
protected
ItemMap
m_Map
;
35
protected
Widget
m_ToolbarPanel
;
36
//int m_MarkerCount;
37
38
protected
ref
MapNavigationBehaviour
m_MapNavigationBehaviour
;
39
40
void
~MapMenu
()
41
{
42
if
(
g_Game
&&
g_Game
.GetMission())
43
{
44
g_Game
.GetMission().GetOnInputPresetChanged().Remove(
OnInputPresetChanged
);
45
g_Game
.GetMission().GetOnInputDeviceChanged().Remove(
OnInputDeviceChanged
);
46
}
47
}
48
49
override
Widget
Init
()
50
{
51
layoutRoot =
g_Game
.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_map.layout"
);
52
m_Hud
= IngameHud.Cast(
g_Game
.GetMission().GetHud());
53
m_IsOpenning
=
true
;
54
55
/*MapWidget m = MapWidget.Cast(layoutRoot.FindAnyWidget("Map"));
56
if (m)
57
{
58
m.AddUserMark("2681 4.7 1751", "Lalal", ARGB(255,255,0,0), "\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
59
m.AddUserMark("2683 4.7 1851", "Lala2", ARGB(255,0,255,0), "\\dz\\gear\\navigation\\data\\map_bunker_ca.paa");
60
m.AddUserMark("2670 4.7 1651", "Lala3", ARGB(255,0,0,255), "\\dz\\gear\\navigation\\data\\map_busstop_ca.paa");
61
}*/
62
63
m_MapToolsContainer
= layoutRoot.FindAnyWidget(
"Map_Tools_Container"
);
64
m_MapToolsContainer
.GetScript(
m_LegendResizer
);
65
66
m_MapWidgetInstance
=
MapWidget
.Cast(layoutRoot.FindAnyWidget(
"Map"
));
67
m_GPSMarker
= layoutRoot.FindAnyWidget(
"GPSMarkerCircle"
);
68
m_GPSMarkerArrow
= ImageWidget.Cast(layoutRoot.FindAnyWidget(
"GPSMarkerArrow"
));
69
m_UpperLegendContainer
= layoutRoot.FindAnyWidget(
"Tools_Extra"
);
70
layoutRoot.Update();
71
m_ToolsCompassBase
= layoutRoot.FindAnyWidget(
"Tools_Compass_Base"
);
72
m_ToolsCompassArrow
= ImageWidget.Cast(layoutRoot.FindAnyWidget(
"Tools_Compass_Arrow"
));
73
m_ToolsCompassAzimuth
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_Compass_Azimuth"
));
74
m_ToolsGPSXText
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_GPS_X_Value"
));
75
m_ToolsGPSYText
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_GPS_Y_Value"
));
76
m_ToolsGPSElevationText
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_GPS_Elevation_Value"
));
77
m_ToolsScaleContourText
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_Scale_Contour_Value"
));
78
m_ToolsScaleCellSizeText
=
TextWidget
.Cast(layoutRoot.FindAnyWidget(
"Tools_Scale_CellSize_Value"
));
79
m_ToolsScaleCellSizeCanvas
= CanvasWidget.Cast(layoutRoot.FindAnyWidget(
"Tools_Scale_CellSize_Canvas"
));
80
m_ToolbarPanel
= layoutRoot.FindAnyWidget(
"toolbar_bg"
);
81
82
float
canvasHeight = 0;
83
m_ToolsScaleCellSizeCanvas
.GetSize(
m_ToolScaleCellSizeCanvasWidth
, canvasHeight);
84
85
if
(
m_MapWidgetInstance
)
86
{
87
float
scale;
88
vector
mapPosition;
89
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer());
90
if
(player && !player.GetLastMapInfo(scale, mapPosition))
91
{
92
vector
tempPosition =
g_Game
.ConfigGetVector(
string
.Format(
"CfgWorlds %1 centerPosition"
,
g_Game
.GetWorldName()));
93
scale = 0.33;
94
mapPosition =
Vector
(tempPosition[0], tempPosition[1], tempPosition[2]);
95
}
96
97
m_MapWidgetInstance
.SetScale(scale);
98
m_MapWidgetInstance
.SetMapPos(mapPosition);
99
100
m_HasCompass =
false
;
101
m_HasGPS =
false
;
102
103
SetGPSMarkerVisibility
(
false
);
104
SetGPSDirectionVisibility
(
false
);
105
SetCompassUIVisibility
(
false
);
106
SetUpperLegendVisibility
(
true
);
107
108
if
(player)
109
{
110
m_MapNavigationBehaviour
= player.GetMapNavigationBehaviour();
111
if
(
m_MapNavigationBehaviour
)
112
{
113
m_HasGPS = (
m_MapNavigationBehaviour
.GetNavigationType() &
EMapNavigationType
.GPS|
EMapNavigationType
.ALL == 0);
114
m_HasCompass = (
m_MapNavigationBehaviour
.GetNavigationType() &
EMapNavigationType
.COMPASS|
EMapNavigationType
.ALL == 0);
115
117
m_HasGPS =
CfgGameplayHandler
.
GetMapIgnoreNavItemsOwnership
() || m_HasGPS;
118
m_HasCompass =
CfgGameplayHandler
.
GetMapIgnoreNavItemsOwnership
() || m_HasCompass;
119
120
if
(m_HasGPS)
121
{
122
SetUpperLegendVisibility
(
true
);
123
if
(m_HasGPS &&
CfgGameplayHandler
.
GetMapDisplayPlayerPosition
())
124
{
125
SetGPSMarkerVisibility
(
true
);
126
m_MapWidgetInstance
.SetMapPos(
m_MapNavigationBehaviour
.GetPositionReal());
127
}
128
}
129
130
if
(m_HasCompass)
131
{
132
SetCompassUIVisibility
(
true
);
133
SetUpperLegendVisibility
(
true
);
134
if
(m_HasGPS &&
CfgGameplayHandler
.
GetMapDisplayPlayerPosition
())
135
{
136
SetGPSDirectionVisibility
(
true
);
137
}
138
}
139
141
if
((!m_HasGPS && !m_HasCompass) || !
CfgGameplayHandler
.
GetMapDisplayNavigationInfo
())
142
{
143
SetUpperLegendVisibility
(
false
);
144
}
145
}
146
}
147
148
m_MapMenuHandler
=
new
MapHandler
(
m_MapWidgetInstance
);
149
150
if
(
m_Hud
)
151
{
152
m_Hud
.ShowHudUI(
false
);
153
m_Hud
.ShowQuickbarUI(
false
);
154
}
155
}
156
157
float
x
,
y
;
158
m_MapToolsContainer
.GetScreenPos(
x
,
y
);
159
m_ToolsContainerPos0
[0] =
x
;
160
m_ToolsContainerPos0
[1] =
y
;
161
162
g_Game
.GetMission().GetOnInputPresetChanged().Insert(
OnInputPresetChanged
);
163
g_Game
.GetMission().GetOnInputDeviceChanged().Insert(
OnInputDeviceChanged
);
164
165
return
layoutRoot;
166
}
167
168
override
void
InitMapItem
(
EntityAI
item)
169
{
170
super.InitMapItem(item);
171
172
m_Map
=
ItemMap
.Cast(item);
173
//m_Map.SyncMapMarkers();
174
//m_MarkerCount = m_Map.GetMarkerArray().Count();
175
}
176
177
override
void
OnShow
()
178
{
179
super.OnShow();
180
181
UpdateControlsElements
();
182
UpdateControlsElementVisibility
();
183
}
184
185
override
bool
OnClick
(
Widget
w,
int
x
,
int
y
,
int
button)
186
{
187
super.OnClick(w,
x
,
y
, button);
188
189
switch
(w.GetUserID())
190
{
191
case
IDC_CANCEL
:
192
CloseMapMenu
();
193
return
true
;
194
}
195
196
return
false
;
197
}
198
199
override
bool
OnKeyPress
(
Widget
w,
int
x
,
int
y
,
int
key)
200
{
201
super.OnKeyPress(w,
x
,
y
, key);
202
203
return
false
;
204
}
205
206
protected
void
OnInputPresetChanged
()
207
{
208
#ifdef PLATFORM_CONSOLE
209
UpdateControlsElements
();
210
#endif
211
}
212
213
protected
void
OnInputDeviceChanged
(
EInputDeviceType
pInputDeviceType)
214
{
215
UpdateControlsElements
();
216
UpdateControlsElementVisibility
();
217
}
218
219
override
void
Update
(
float
timeslice)
220
{
221
super.Update(timeslice);
222
m_ToolsScaleCellSizeCanvas
.Clear();
223
224
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer());
225
226
if
(
m_MapWidgetInstance
)
227
{
228
if
(
m_Images
)
229
{
230
m_MapWidgetInstance
.RemoveChild(
m_Images
);
231
}
232
233
if
(player)
234
{
235
m_ToolsScaleContourText
.SetText(
string
.Format(
"%1 m"
,
m_MapWidgetInstance
.GetContourInterval()));
236
RenderScaleRuler
();
237
float
rulerMaxDistance;
238
string
rulerUnits;
239
ProcessDistanceAndUnits
(
m_MapWidgetInstance
.GetCellSize(
m_ToolScaleCellSizeCanvasWidth
), rulerMaxDistance, rulerUnits);
240
m_ToolsScaleCellSizeText
.SetText(
string
.Format(
"%1%2"
, rulerMaxDistance, rulerUnits));
241
242
if
(
m_MapNavigationBehaviour
)
243
{
244
vector
mapPos =
m_MapWidgetInstance
.MapToScreen(
m_MapNavigationBehaviour
.GetPositionReal());
245
float
scale = 1 -
m_MapWidgetInstance
.GetScale();
246
247
if
(m_HasCompass)
248
{
249
vector
rot = player.GetYawPitchRoll();
250
float
angle =
Math
.
Round
(rot[0]);
251
if
(angle < 0)
252
{
253
angle = 360 + angle;
254
}
255
256
m_GPSMarkerArrow
.SetRotation(0, 0, angle);
257
m_ToolsCompassArrow
.SetRotation(0, 0, angle);
258
m_ToolsCompassAzimuth
.SetText(
string
.Format(
"%1°"
, angle));
259
}
260
261
array<int>
coords =
MapNavigationBehaviour
.OrderedPositionNumbersFromGridCoords(player);
262
if
(m_HasGPS ||
CfgGameplayHandler
.
GetMapIgnoreNavItemsOwnership
())
263
{
264
m_GPSMarker
.SetSize(scale * 100, scale * 100);
265
m_GPSMarkerArrow
.SetSize(scale * 100, scale * 100);
266
float
sizeX, sizeY;
267
m_GPSMarker
.GetSize(sizeX, sizeY);
268
sizeX =
Math
.
Round
(sizeX);
269
sizeY =
Math
.
Round
(sizeY);
270
m_GPSMarker
.SetPos(mapPos[0] - sizeX/2, mapPos[1] - sizeY/2);
271
m_GPSMarkerArrow
.SetPos(mapPos[0] - sizeX/2, mapPos[1] - sizeY/2);
272
273
if
(coords.Count() ==
m_MapNavigationBehaviour
.DISPLAY_GRID_POS_MAX_CHARS_COUNT * 2 && coords[0] >= 0)
274
{
275
m_ToolsGPSXText
.SetText(
string
.Format(
COORD_FORMAT
, coords[0], coords[1], coords[2]));
276
m_ToolsGPSYText
.SetText(
string
.Format(
COORD_FORMAT
, coords[3], coords[4], coords[5]));
277
}
278
else
279
{
280
m_ToolsGPSXText
.SetText(
"-.--"
);
281
m_ToolsGPSYText
.SetText(
"-.--"
);
282
}
283
284
m_ToolsGPSElevationText
.SetText(
string
.Format(
"%1m"
,
Math
.
Round
(player.GetPosition()[1])));
285
}
286
else
287
{
288
m_ToolsGPSXText
.SetText(
"-.--"
);
289
m_ToolsGPSYText
.SetText(
"-.--"
);
290
m_ToolsGPSElevationText
.SetText(
"----m"
);
291
}
292
}
293
}
294
295
bool
isClosedWithShortcut =
CfgGameplayHandler
.
GetMapIgnoreMapOwnership
() &&
GetUApi
().
GetInputByID
(UAMapToggle).
LocalPress
();
296
if
(!
m_IsOpenning
&& (
GetUApi
().GetInputByID(UAUIBack).LocalPress() || isClosedWithShortcut))
297
{
298
if
(player)
299
{
300
player.SetLastMapInfo(
m_MapWidgetInstance
.GetScale(),
m_MapWidgetInstance
.GetMapPos());
301
}
302
303
CloseMapMenu
();
304
}
305
306
m_IsOpenning
=
false
;
307
}
308
}
309
310
void
AddMarker
(
vector
pos,
int
color,
int
icon = 0)
311
{
312
m_Map
.InsertMarker(pos,
""
,color,icon);
313
m_MapWidgetInstance
.AddUserMark(pos,
""
, color,
MapMarkerTypes
.
GetMarkerTypeFromID
(icon));
314
m_WasChanged
=
true
;
315
}
316
317
void
RemoveMarker
()
318
{
319
m_WasChanged
=
true
;
320
}
321
322
override
void
LoadMapMarkers
()
323
{
324
MapMarker
marker;
325
for
(
int
i = 0; i <
m_Map
.GetMarkerArray().
Count
(); i++)
326
{
327
marker =
m_Map
.GetMarkerArray().Get(i);
328
m_MapWidgetInstance
.AddUserMark(marker.
GetMarkerPos
(),marker.
GetMarkerText
(),marker.
GetMarkerColor
(),
MapMarkerTypes
.
GetMarkerTypeFromID
(marker.
GetMarkerIcon
())
/*"\\dz\\gear\\navigation\\data\\map_tree_ca.paa"*/
);
329
}
330
}
331
332
void
CloseMapMenu
()
333
{
334
if
(
m_WasChanged
)
335
{
336
m_Map
.SyncMapMarkers();
337
m_WasChanged
=
false
;
338
}
339
340
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer());
341
if
(player)
342
{
343
player.SetMapClosingSyncSet(
false
);
//map is closing, server needs to be notified - once
344
}
345
346
if
(
m_Hud
)
347
{
348
m_Hud
.ShowHudUI(
true
);
349
m_Hud
.ShowQuickbarUI(
true
);
350
}
351
352
if
(
CfgGameplayHandler
.
GetMapIgnoreMapOwnership
())
353
{
354
if
(!
CfgGameplayHandler
.
GetUse3DMap
())
355
{
356
g_Game
.GetMission().RemoveActiveInputExcludes({
"map"
});
357
}
358
else
359
{
360
g_Game
.GetMission().RemoveActiveInputExcludes({
"loopedactions"
});
361
}
362
363
g_Game
.GetMission().RemoveActiveInputRestriction(EInputRestrictors.MAP);
364
}
365
366
Close
();
367
}
368
369
protected
void
SetCompassUIVisibility
(
bool
pState)
370
{
371
if
(
m_ToolsCompassArrow
)
372
{
373
m_ToolsCompassArrow
.Show(pState);
374
}
375
376
if
(
m_ToolsCompassAzimuth
)
377
{
378
m_ToolsCompassAzimuth
.Show(pState);
379
}
380
}
381
382
protected
void
SetGPSMarkerVisibility
(
bool
pState)
383
{
384
if
(
m_GPSMarker
)
385
{
386
m_GPSMarker
.Show(pState);
387
}
388
}
389
390
protected
void
SetGPSDirectionVisibility
(
bool
pState)
391
{
392
if
(
m_GPSMarkerArrow
)
393
{
394
m_GPSMarkerArrow
.Show(pState);
395
}
396
}
397
398
protected
void
SetUpperLegendVisibility
(
bool
pState)
399
{
400
if
(
m_UpperLegendContainer
)
401
{
402
m_UpperLegendContainer
.Show(pState);
403
}
404
405
if
(
m_LegendResizer
)
406
{
407
m_LegendResizer
.ResizeParentToChild();
408
}
409
}
410
411
protected
void
RenderScaleRuler
()
412
{
413
float
sizeYShift = 8;
414
float
segmentLength =
m_ToolScaleCellSizeCanvasWidth
/
SCALE_RULER_NUM_SEGMENTS
;
415
int
lineColor = FadeColors.BLACK;
416
417
for
(
int
i = 1; i <=
SCALE_RULER_NUM_SEGMENTS
; i++)
418
{
419
lineColor = FadeColors.BLACK;
420
if
(i % 2 == 0)
421
{
422
lineColor = FadeColors.LIGHT_GREY;
423
}
424
425
if
(i == 1)
426
{
427
m_ToolsScaleCellSizeCanvas
.DrawLine(0, sizeYShift, segmentLength, sizeYShift,
SCALE_RULER_LINE_WIDTH
, lineColor);
428
}
429
else
if
(i ==
SCALE_RULER_NUM_SEGMENTS
)
430
{
431
m_ToolsScaleCellSizeCanvas
.DrawLine(segmentLength * (
SCALE_RULER_NUM_SEGMENTS
- 1), sizeYShift, segmentLength *
SCALE_RULER_NUM_SEGMENTS
, sizeYShift,
SCALE_RULER_LINE_WIDTH
, lineColor);
432
}
433
else
434
{
435
m_ToolsScaleCellSizeCanvas
.DrawLine(segmentLength * (i - 1), sizeYShift, segmentLength * i, sizeYShift,
SCALE_RULER_LINE_WIDTH
, lineColor);
436
}
437
}
438
}
439
440
protected
void
ProcessDistanceAndUnits
(
float
num, out
float
dist, out
string
units)
441
{
442
if
(num >= 901)
443
{
444
num *= 0.001;
445
num =
Math
.
Round
(num * 10) * 0.1;
446
dist = num;
447
units =
"km"
;
448
}
449
else
if
(num >= 100 && num <= 900)
450
{
451
num =
Math
.
Ceil
(num * 0.1) * 10;
452
dist = num;
453
units =
"m"
;
454
}
455
else
if
(num >= 1)
456
{
457
num =
Math
.
Floor
(num);
458
dist = num;
459
units =
"m"
;
460
}
461
else
462
{
463
num =
Math
.
Ceil
(num * 10);
464
dist = num;
465
units =
"cm"
;
466
}
467
}
468
469
protected
void
UpdateControlsElements
()
470
{
471
RichTextWidget
toolbarText =
RichTextWidget
.Cast(layoutRoot.FindAnyWidget(
"ContextToolbarText"
));
472
string
text =
string
.Empty;
473
474
text +=
string
.
Format
(
" <image set=\"xbox_buttons\" name=\"LS\" scale=\"%1\" /> %2 "
,
InputUtils
.
ICON_SCALE_TOOLBAR
,
"#layout_map_navigate"
);
475
text +=
string
.
Format
(
" <image set=\"xbox_buttons\" name=\"RS\" scale=\"%1\" /> %2 "
,
InputUtils
.
ICON_SCALE_TOOLBAR
,
"#STR_Controls_Zoom"
);
476
text +=
string
.
Format
(
" %1"
,
InputUtils
.
GetRichtextButtonIconFromInputAction
(
"UAUIBack"
,
"#close"
, EUAINPUT_DEVICE_CONTROLLER,
InputUtils
.
ICON_SCALE_TOOLBAR
));
477
478
toolbarText.SetText(text);
479
}
480
481
protected
void
UpdateControlsElementVisibility
()
482
{
483
bool
toolbarShow =
false
;
484
#ifdef PLATFORM_CONSOLE
485
toolbarShow = !
g_Game
.GetInput().IsEnabledMouseAndKeyboard() ||
g_Game
.GetInput().GetCurrentInputDevice() ==
EInputDeviceType
.CONTROLLER;
486
#endif
487
488
m_ToolbarPanel
.Show(toolbarShow);
489
ShiftMapToolsContainer
();
490
}
491
492
protected
void
ShiftMapToolsContainer
()
493
{
494
if
(
m_ToolbarPanel
.IsVisible())
495
{
496
float
sizeX,sizeY;
497
m_ToolbarPanel
.GetScreenSize(sizeX,sizeY);
498
m_MapToolsContainer
.SetScreenPos(
m_ToolsContainerPos0
[0],
m_ToolsContainerPos0
[1] - sizeY);
499
}
500
else
501
m_MapToolsContainer
.SetScreenPos(
m_ToolsContainerPos0
[0],
m_ToolsContainerPos0
[1]);
502
}
503
}
CfgGameplayHandler
Definition
cfggameplayhandler.c:2
CfgGameplayHandler::GetMapDisplayNavigationInfo
static bool GetMapDisplayNavigationInfo()
Definition
cfggameplayhandler.c:428
CfgGameplayHandler::GetMapIgnoreMapOwnership
static bool GetMapIgnoreMapOwnership()
Definition
cfggameplayhandler.c:413
CfgGameplayHandler::GetMapIgnoreNavItemsOwnership
static bool GetMapIgnoreNavItemsOwnership()
Definition
cfggameplayhandler.c:418
CfgGameplayHandler::GetUse3DMap
static bool GetUse3DMap()
Definition
cfggameplayhandler.c:392
CfgGameplayHandler::GetMapDisplayPlayerPosition
static bool GetMapDisplayPlayerPosition()
Definition
cfggameplayhandler.c:423
EntityAI
Definition
inventoryitem.c:2
InputUtils
Definition
inpututils.c:2
InputUtils::ICON_SCALE_TOOLBAR
static const float ICON_SCALE_TOOLBAR
Definition
inpututils.c:15
InputUtils::GetRichtextButtonIconFromInputAction
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition
inpututils.c:167
ItemMap
Definition
chernarusmap_open.c:2
MapHandler
Definition
maphandler.c:2
MapMarker
Definition
inventoryitem.c:1199
MapMarker::GetMarkerText
string GetMarkerText()
Definition
inventoryitem.c:1218
MapMarker::GetMarkerColor
int GetMarkerColor()
Definition
inventoryitem.c:1223
MapMarker::GetMarkerIcon
int GetMarkerIcon()
Definition
inventoryitem.c:1228
MapMarker::GetMarkerPos
vector GetMarkerPos()
Definition
inventoryitem.c:1213
MapMarkerTypes
Definition
mapmarkersinfo.c:2
MapMarkerTypes::GetMarkerTypeFromID
static string GetMarkerTypeFromID(int id)
Definition
mapmarkersinfo.c:36
MapWidget
Definition
gameplay.c:323
Math
Definition
enmath.c:7
PlayerBase
Definition
playerbaseclient.c:2
RichTextWidget
Definition
gameplay.c:317
TextWidget
Definition
enwidgets.c:220
UAInputAPI::GetInputByID
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
UAInput::LocalPress
proto native bool LocalPress()
UIScriptedMenu
Xbox menu.
Definition
dayzgame.c:64
UIScriptedMenu::m_ToolsScaleCellSizeCanvas
CanvasWidget m_ToolsScaleCellSizeCanvas
Definition
mapmenu.c:33
UIScriptedMenu::OnInputPresetChanged
void OnInputPresetChanged()
Definition
controlsxboxnew.c:63
UIScriptedMenu::m_Hud
ref IngameHud m_Hud
Definition
mapmenu.c:15
UIScriptedMenu::CloseMapMenu
void CloseMapMenu()
Definition
mapmenu.c:332
UIScriptedMenu::SCALE_RULER_NUM_SEGMENTS
const int SCALE_RULER_NUM_SEGMENTS
Definition
mapmenu.c:5
UIScriptedMenu::m_ToolsScaleCellSizeText
TextWidget m_ToolsScaleCellSizeText
Definition
mapmenu.c:32
UIScriptedMenu::UpdateControlsElementVisibility
void UpdateControlsElementVisibility()
Definition
controlsxboxnew.c:545
UIScriptedMenu::Update
override void Update(float timeslice)
Definition
mapmenu.c:219
UIScriptedMenu::m_MapToolsContainer
Widget m_MapToolsContainer
Definition
mapmenu.c:20
UIScriptedMenu::m_ToolsCompassArrow
ImageWidget m_ToolsCompassArrow
Definition
mapmenu.c:26
UIScriptedMenu::~MapMenu
void ~MapMenu()
Definition
mapmenu.c:40
UIScriptedMenu::ShiftMapToolsContainer
void ShiftMapToolsContainer()
Definition
mapmenu.c:492
UIScriptedMenu::m_MapWidgetInstance
ref MapWidget m_MapWidgetInstance
Definition
mapmenu.c:17
UIScriptedMenu::SetUpperLegendVisibility
void SetUpperLegendVisibility(bool pState)
Definition
mapmenu.c:398
UIScriptedMenu::m_ToolbarPanel
Widget m_ToolbarPanel
Definition
gesturesmenu.c:110
UIScriptedMenu::LoadMapMarkers
override void LoadMapMarkers()
Definition
mapmenu.c:322
UIScriptedMenu::OnShow
override void OnShow()
Definition
mapmenu.c:177
UIScriptedMenu::m_ToolsGPSElevationText
TextWidget m_ToolsGPSElevationText
Definition
mapmenu.c:29
UIScriptedMenu::m_MapMenuHandler
ref MapHandler m_MapMenuHandler
Definition
mapmenu.c:16
UIScriptedMenu::m_MapNavigationBehaviour
ref MapNavigationBehaviour m_MapNavigationBehaviour
Definition
mapmenu.c:38
UIScriptedMenu::m_LegendResizer
ref SizeToChild m_LegendResizer
Definition
mapmenu.c:18
UIScriptedMenu::m_ToolScaleCellSizeCanvasWidth
float m_ToolScaleCellSizeCanvasWidth
Definition
mapmenu.c:12
UIScriptedMenu::m_IsOpenning
bool m_IsOpenning
Definition
mapmenu.c:10
UIScriptedMenu::m_Images
ImageWidget m_Images
Definition
mapmenu.c:21
UIScriptedMenu::SetCompassUIVisibility
void SetCompassUIVisibility(bool pState)
Definition
mapmenu.c:369
UIScriptedMenu::SCALE_RULER_LINE_WIDTH
const int SCALE_RULER_LINE_WIDTH
Definition
mapmenu.c:4
UIScriptedMenu::ProcessDistanceAndUnits
void ProcessDistanceAndUnits(float num, out float dist, out string units)
Definition
mapmenu.c:440
UIScriptedMenu::RemoveMarker
void RemoveMarker()
Definition
mapmenu.c:317
UIScriptedMenu::OnKeyPress
override bool OnKeyPress(Widget w, int x, int y, int key)
Definition
mapmenu.c:199
UIScriptedMenu::SetGPSDirectionVisibility
void SetGPSDirectionVisibility(bool pState)
Definition
mapmenu.c:390
UIScriptedMenu::COORD_FORMAT
const string COORD_FORMAT
Definition
mapmenu.c:3
UIScriptedMenu::AddMarker
void AddMarker(vector pos, int color, int icon=0)
Definition
mapmenu.c:310
UIScriptedMenu::InitMapItem
override void InitMapItem(EntityAI item)
Definition
mapmenu.c:168
UIScriptedMenu::OnInputDeviceChanged
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Definition
controlsxboxnew.c:71
UIScriptedMenu::m_ToolsContainerPos0
float m_ToolsContainerPos0[2]
Definition
mapmenu.c:13
UIScriptedMenu::m_WasChanged
bool m_WasChanged
Definition
mapmenu.c:7
UIScriptedMenu::Init
override Widget Init()
Definition
mapmenu.c:49
UIScriptedMenu::m_ToolsCompassAzimuth
TextWidget m_ToolsCompassAzimuth
Definition
mapmenu.c:27
UIScriptedMenu::m_ToolsGPSXText
TextWidget m_ToolsGPSXText
Definition
mapmenu.c:30
UIScriptedMenu::UpdateControlsElements
void UpdateControlsElements()
Definition
controlsxboxnew.c:535
UIScriptedMenu::m_ToolsScaleContourText
TextWidget m_ToolsScaleContourText
Definition
mapmenu.c:28
UIScriptedMenu::m_UpperLegendContainer
Widget m_UpperLegendContainer
Definition
mapmenu.c:24
UIScriptedMenu::m_ToolsCompassBase
Widget m_ToolsCompassBase
Definition
mapmenu.c:25
UIScriptedMenu::m_ToolsGPSYText
TextWidget m_ToolsGPSYText
Definition
mapmenu.c:31
UIScriptedMenu::SetGPSMarkerVisibility
void SetGPSMarkerVisibility(bool pState)
Definition
mapmenu.c:382
UIScriptedMenu::OnClick
override bool OnClick(Widget w, int x, int y, int button)
Definition
mapmenu.c:185
UIScriptedMenu::RenderScaleRuler
void RenderScaleRuler()
Definition
mapmenu.c:411
UIScriptedMenu::m_GPSMarkerArrow
ImageWidget m_GPSMarkerArrow
Definition
mapmenu.c:23
UIScriptedMenu::m_Map
ItemMap m_Map
Definition
mapmenu.c:34
UIScriptedMenu::m_GPSMarker
Widget m_GPSMarker
Definition
mapmenu.c:22
Widget
Definition
enwidgets.c:190
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
vector
Definition
enconvert.c:119
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
Math::Round
static proto float Round(float f)
Returns mathematical round of value.
Math::Ceil
static proto float Ceil(float f)
Returns ceil of value.
Math::Floor
static proto float Floor(float f)
Returns floor of value.
string::Format
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.
IDC_CANCEL
const int IDC_CANCEL
Definition
constants.c:136
x
Icon x
y
Icon y
EInputDeviceType
EInputDeviceType
Definition
input.c:3
Close
void Close()
EMapNavigationType
EMapNavigationType
Definition
mapnavigationbehaviour.c:2
MapNavigationBehaviour
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
Definition
mapnavigationbehaviour.c:27
Count
@ Count
Definition
randomgeneratorsyncmanager.c:8
GetUApi
proto native UAInputAPI GetUApi()
Games
Dayz
scripts
5_mission
gui
mapmenu.c
Generated by
1.17.0