Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
maphandler.c
Go to the documentation of this file.
1
class
MapHandler
:
ScriptedWidgetEventHandler
2
{
3
protected
Widget
m_Root;
4
5
void
MapHandler
(
Widget
w)
6
{
7
m_Root
= w;
8
m_Root
.SetHandler(
this
);
9
}
10
11
override
bool
OnKeyDown(
Widget
w,
int
x
,
int
y
,
int
key)
12
{
13
if
(!super.OnKeyDown(w,
x
,
y
, key))
14
return
false
;
15
16
vector
screen_to_map =
MapWidget
.Cast(w).ScreenToMap(
Vector
(
x
,
y
,0));
17
Print
(key);
18
Print
(screen_to_map);
19
return
true
;
20
}
21
22
override
bool
OnDoubleClick(
Widget
w,
int
x
,
int
y
,
int
button)
23
{
24
super.OnDoubleClick(w,
x
,
y
, button);
25
26
vector
screen_to_map =
MapWidget
.Cast(w).ScreenToMap(
Vector
(
x
,
y
,0));
27
MapMenu m = MapMenu.Cast(
g_Game
.GetUIManager().FindMenu(
MENU_MAP
));
28
int
rand =
Math
.RandomInt(0,eMapMarkerTypes.MARKERTYPE_MAX);
29
//m.AddMarker(screen_to_map,ARGB(255,255,0,0),rand);
30
31
//m.AddUserMark(screen_to_map, "marker", ARGB(255,0,0,255), "\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
32
33
return
true
;
34
}
35
36
/*void AddMarker(MapWidget w, vector pos, int color, int icon = -1)
37
{
38
w.AddUserMark(pos, "", color, "\\dz\\gear\\navigation\\data\\map_tree_ca.paa");
39
}*/
40
};
MENU_MAP
const int MENU_MAP
Definition:
constants.c:181
MapWidget
Definition:
gameplay.c:321
y
Icon y
Print
proto void Print(void var)
Prints content of variable to console/log.
MapHandler
Definition:
maphandler.c:1
vector
Definition:
enconvert.c:105
g_Game
DayZGame g_Game
Definition:
dayzgame.c:3727
x
Icon x
Widget
Definition:
enwidgets.c:189
Math
Definition:
enmath.c:6
m_Root
protected Widget m_Root
Definition:
sizetochild.c:91
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition:
enwidgets.c:650
DAYZ
scripts_v1.24.157551
scripts
mission
gui
maphandler.c
Generated by
1.8.17