DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
MapHandler.c
См. документацию.
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
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};
DayZGame g_Game
Определения DayZGame.c:3868
Icon x
Icon y
override bool OnDoubleClick(Widget w, int x, int y, int button)
Определения MapHandler.c:22
void MapHandler(Widget w)
Определения MapHandler.c:5
override bool OnKeyDown(Widget w, int x, int y, int key)
Определения MapHandler.c:11
Widget m_Root
Определения MapHandler.c:3
proto native vector ScreenToMap(vector screenPos)
Определения gameplay.c:323
Определения EnMath.c:7
map: item x vector(index, width, height)
Определения EnWidgets.c:651
Определения EnWidgets.c:190
Определения EnConvert.c:106
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
Определения constants.c:191