DayZ 1.24
Loading...
Searching...
No Matches
MapHandler.c
Go to the documentation of this file.
2{
3 protected Widget m_Root;
4
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
17 Print(key);
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
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};
DayZGame g_Game
Definition DayZGame.c:3528
Icon x
Icon y
override bool OnDoubleClick(Widget w, int x, int y, int button)
Definition MapHandler.c:22
void MapHandler(Widget w)
Definition MapHandler.c:5
override bool OnKeyDown(Widget w, int x, int y, int key)
Definition MapHandler.c:11
Widget m_Root
Definition MapHandler.c:3
proto native vector ScreenToMap(vector screenPos)
Definition EnMath.c:7
map: item x vector(index, width, height)
Definition EnWidgets.c:651
proto void Print(void var)
Prints content of variable to console/log.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
const int MENU_MAP
Definition constants.c:181