Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
};
MapHandler::m_Root
Widget m_Root
Definition
maphandler.c:3
MapHandler::OnKeyDown
override bool OnKeyDown(Widget w, int x, int y, int key)
Definition
maphandler.c:11
MapHandler::OnDoubleClick
override bool OnDoubleClick(Widget w, int x, int y, int button)
Definition
maphandler.c:22
MapHandler::MapHandler
void MapHandler(Widget w)
Definition
maphandler.c:5
MapWidget
Definition
gameplay.c:323
MapWidget::ScreenToMap
proto native vector ScreenToMap(vector screenPos)
Math
Definition
enmath.c:7
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition
enwidgets.c:657
Widget
Definition
enwidgets.c:190
vector
Definition
enconvert.c:119
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Print
proto void Print(void var)
Prints content of variable to console/log.
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
Math::RandomInt
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
MENU_MAP
const int MENU_MAP
Definition
constants.c:191
x
Icon x
y
Icon y
Games
Dayz
scripts
5_mission
gui
maphandler.c
Generated by
1.17.0