DayZ
1.24
Loading...
Searching...
No Matches
UIScriptedMenu.c
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
class
UIMenuPanel
:
Managed
3
{
4
proto
native
UIMenuPanel
GetSubMenu
();
5
proto
native
UIMenuPanel
GetParentMenu
();
6
proto
native
UIMenuPanel
GetVisibleMenu
();
7
proto
native
void
SetSubMenu
(
UIMenuPanel
submenu
);
8
proto
native
void
SetParentMenu
(
UIMenuPanel
parent);
9
proto
native
bool
CanClose
();
10
proto
native
bool
CanCloseOnEscape
();
12
proto
native
UIScriptedMenu
EnterScriptedMenu
(
int
id
);
13
14
proto
native
void
DestroySubmenu
();
15
proto
native
bool
IsAnyMenuVisible
();
16
proto
native
bool
IsVisible
();
17
18
#ifdef FEATURE_CURSOR
20
proto
native
bool
IsCreatedHidden
();
21
#endif
22
25
void
OnVisibilityChanged
(
bool
isVisible
)
26
{
27
}
28
30
proto
native
void
Close
();
31
32
bool
UseMouse
()
33
{
34
#ifdef PLATFORM_CONSOLE
35
return
GetGame
().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
36
#else
37
return
true
;
38
#endif
39
}
40
41
bool
UseKeyboard
()
42
{
43
#ifdef PLATFORM_CONSOLE
44
return
GetGame
().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
45
#else
46
return
true
;
47
#endif
48
}
49
50
bool
UseGamepad
()
51
{
52
return
true
;
53
}
54
56
int
GetID
()
57
{
58
return
MENU_UNKNOWN
;
59
}
60
62
void
Refresh
()
63
{
64
}
65
};
66
67
//-----------------------------------------------------------------------------
69
class
UIScriptedMenu
extends
UIMenuPanel
70
{
71
int
m_id
;
72
Widget
layoutRoot
;
73
private
Widget
m_AnimAlphaWidget
;
74
private
bool
m_AnimAlphaIsIncreasing
;
75
private
float
m_AnimAlphaValue
;
76
77
Widget
GetLayoutRoot
()
78
{
79
return
layoutRoot;
80
}
81
82
void
LockControls
()
83
{
84
#ifdef FEATURE_CURSOR
85
if
(
IsCreatedHidden
())
86
return
;
87
#endif
88
89
if
(
UseMouse
())
90
{
91
GetGame
().GetInput().ChangeGameFocus(1,
INPUT_DEVICE_MOUSE
);
92
GetGame
().GetUIManager().ShowUICursor(
true
);
93
}
94
95
if
(
UseKeyboard
())
96
GetGame
().GetInput().ChangeGameFocus(1,
INPUT_DEVICE_KEYBOARD
);
97
98
if
(
UseGamepad
())
99
GetGame
().GetInput().ChangeGameFocus(1,
INPUT_DEVICE_GAMEPAD
);
100
}
101
102
void
UnlockControls
()
103
{
104
#ifdef FEATURE_CURSOR
105
if
(
IsCreatedHidden
())
106
return
;
107
#endif
108
109
if
(
UseMouse
())
110
GetGame
().GetInput().ChangeGameFocus(-1,
INPUT_DEVICE_MOUSE
);
111
112
if
(GetParentMenu() && GetParentMenu().
UseMouse
())
113
GetGame
().GetUIManager().ShowUICursor(
true
);
114
else
115
GetGame
().GetUIManager().ShowUICursor(
false
);
116
117
if
(
UseKeyboard
())
118
GetGame
().GetInput().ChangeGameFocus(-1,
INPUT_DEVICE_KEYBOARD
);
119
120
if
(
UseGamepad
())
121
GetGame
().GetInput().ChangeGameFocus(-1,
INPUT_DEVICE_GAMEPAD
);
122
}
123
124
void
UIScriptedMenu
()
125
{
126
m_id =
MENU_UNKNOWN
;
127
}
128
129
void
~UIScriptedMenu
()
130
{
131
}
132
134
void
SetID
(
int
id
)
135
{
136
m_id =
id
;
137
}
138
140
override
int
GetID
()
141
{
142
return
m_id;
143
}
144
145
void
SetWidgetAnimAlpha
(
Widget
widget
)
146
{
147
m_AnimAlphaValue = 0.3;
148
m_AnimAlphaWidget =
widget
;
149
}
150
151
//create widgets here and return layout root Widget
152
//widgets will be destroyed automatically by c++ side
153
Widget
Init
()
154
{
155
return
NULL
;
156
}
157
158
void
Cleanup
()
159
{
160
}
161
162
//after show
163
void
OnShow
()
164
{
165
LockControls();
166
}
167
168
//after hide
169
void
OnHide
()
170
{
171
UnlockControls();
172
}
173
175
void
Update
(
float
timeslice
)
176
{
177
#ifdef PLATFORM_CONSOLE
178
if
(m_AnimAlphaWidget)
179
{
180
float
anim_speed
= 1.2;
181
float
anim_value_max
= 1.0;
182
float
anim_value_min
= 0.3;
183
if
(m_AnimAlphaIsIncreasing)
184
{
185
m_AnimAlphaValue +=
anim_speed
*
timeslice
;
186
187
if
(m_AnimAlphaValue >=
anim_value_max
)
188
{
189
m_AnimAlphaValue =
anim_value_max
;
190
m_AnimAlphaIsIncreasing =
false
;
191
}
192
}
193
else
194
{
195
m_AnimAlphaValue -=
anim_speed
*
timeslice
;
196
197
if
(m_AnimAlphaValue <=
anim_value_min
)
198
{
199
m_AnimAlphaValue =
anim_value_min
;
200
m_AnimAlphaIsIncreasing =
true
;
201
}
202
}
203
204
205
m_AnimAlphaWidget.SetAlpha(m_AnimAlphaValue);
206
}
207
#endif
208
}
209
210
// Moved to parent
212
//void Refresh()
213
//{
214
//}
215
216
proto
native
void
SetFadingPanels
(
Widget
panel0
,
Widget
panel1
,
Widget
panel2
,
Widget
panel3
,
Widget
panel4
);
217
218
bool
OnClick
(
Widget
w
,
int
x
,
int
y
,
int
button
)
219
{
220
if
(
UIScriptedWindow
.
GetActiveWindows
())
221
{
222
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
223
{
224
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnClick(
w
,
x
,
y
,
button
))
225
return
true
;
226
}
227
}
228
229
return
false
;
230
}
231
bool
OnModalResult
(
Widget
w
,
int
x
,
int
y
,
int
code
,
int
result
)
232
{
233
if
(
UIScriptedWindow
.
GetActiveWindows
())
234
{
235
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
236
{
237
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnModalResult(
w
,
x
,
y
,
code
,
result
))
238
return
true
;
239
}
240
}
241
242
return
false
;
243
}
244
bool
OnDoubleClick
(
Widget
w
,
int
x
,
int
y
,
int
button
)
245
{
246
if
(
UIScriptedWindow
.
GetActiveWindows
())
247
{
248
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
249
{
250
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDoubleClick(
w
,
x
,
y
,
button
))
251
return
true
;
252
}
253
}
254
255
return
false
;
256
}
257
bool
OnSelect
(
Widget
w
,
int
x
,
int
y
)
258
{
259
if
(
UIScriptedWindow
.
GetActiveWindows
())
260
{
261
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
262
{
263
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnSelect(
w
,
x
,
y
))
264
return
true
;
265
}
266
}
267
268
return
false
;
269
}
270
bool
OnItemSelected
(
Widget
w
,
int
x
,
int
y
,
int
row
,
int
column
,
int
oldRow
,
int
oldColumn
)
271
{
272
if
(
UIScriptedWindow
.
GetActiveWindows
())
273
{
274
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
275
{
276
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnItemSelected(
w
,
x
,
y
,
row
,
column
,
oldRow
,
oldColumn
))
277
return
true
;
278
}
279
}
280
281
return
false
;
282
}
283
bool
OnFocus
(
Widget
w
,
int
x
,
int
y
)
284
{
285
if
(
UIScriptedWindow
.
GetActiveWindows
())
286
{
287
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
288
{
289
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnFocus(
w
,
x
,
y
))
290
return
true
;
291
}
292
}
293
294
return
false
;
295
}
296
bool
OnFocusLost
(
Widget
w
,
int
x
,
int
y
)
297
{
298
if
(
UIScriptedWindow
.
GetActiveWindows
())
299
{
300
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
301
{
302
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnFocusLost(
w
,
x
,
y
))
303
return
true
;
304
}
305
}
306
307
return
false
;
308
}
309
bool
OnMouseEnter
(
Widget
w
,
int
x
,
int
y
)
310
{
311
if
(
UIScriptedWindow
.
GetActiveWindows
())
312
{
313
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
314
{
315
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnMouseEnter(
w
,
x
,
y
))
316
return
true
;
317
}
318
}
319
320
return
false
;
321
}
322
bool
OnMouseLeave
(
Widget
w
,
Widget
enterW
,
int
x
,
int
y
)
323
{
324
if
(
UIScriptedWindow
.
GetActiveWindows
())
325
{
326
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
327
{
328
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnMouseLeave(
w
,
enterW
,
x
,
y
))
329
return
true
;
330
}
331
}
332
333
return
false
;
334
}
335
bool
OnMouseButtonDown
(
Widget
w
,
int
x
,
int
y
,
int
button
)
336
{
337
if
(
UIScriptedWindow
.
GetActiveWindows
())
338
{
339
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
340
{
341
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnMouseButtonDown(
w
,
x
,
y
,
button
))
342
return
true
;
343
}
344
}
345
346
return
false
;
347
}
348
bool
OnMouseButtonUp
(
Widget
w
,
int
x
,
int
y
,
int
button
)
349
{
350
if
(
UIScriptedWindow
.
GetActiveWindows
())
351
{
352
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
353
{
354
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnMouseButtonUp(
w
,
x
,
y
,
button
))
355
return
true
;
356
}
357
}
358
359
return
false
;
360
}
361
bool
OnMouseWheel
(
Widget
w
,
int
x
,
int
y
,
int
wheel
)
362
{
363
if
(
UIScriptedWindow
.
GetActiveWindows
())
364
{
365
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
366
{
367
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnMouseWheel(
w
,
x
,
y
,
wheel
))
368
return
true
;
369
}
370
}
371
372
return
false
;
373
}
374
bool
OnController
(
Widget
w
,
int
control
,
int
value
)
375
{
376
if
(
UIScriptedWindow
.
GetActiveWindows
())
377
{
378
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
379
{
380
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnController(
w
,
control
,
value
))
381
return
true
;
382
}
383
}
384
385
return
false
;
386
}
387
bool
OnKeyDown
(
Widget
w
,
int
x
,
int
y
,
int
key
)
388
{
389
if
(
UIScriptedWindow
.
GetActiveWindows
())
390
{
391
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
392
{
393
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnKeyDown(
w
,
x
,
y
,
key
))
394
return
true
;
395
}
396
}
397
398
return
false
;
399
}
400
bool
OnKeyUp
(
Widget
w
,
int
x
,
int
y
,
int
key
)
401
{
402
if
(
UIScriptedWindow
.
GetActiveWindows
())
403
{
404
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
405
{
406
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnKeyUp(
w
,
x
,
y
,
key
))
407
return
true
;
408
}
409
}
410
411
return
false
;
412
}
413
bool
OnKeyPress
(
Widget
w
,
int
x
,
int
y
,
int
key
)
414
{
415
if
(
UIScriptedWindow
.
GetActiveWindows
())
416
{
417
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
418
{
419
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnKeyPress(
w
,
x
,
y
,
key
))
420
return
true
;
421
}
422
}
423
424
return
false
;
425
}
426
bool
OnChange
(
Widget
w
,
int
x
,
int
y
,
bool
finished
)
427
{
428
if
(
UIScriptedWindow
.
GetActiveWindows
())
429
{
430
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
431
{
432
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnChange(
w
,
x
,
y
,
finished
))
433
return
true
;
434
}
435
}
436
437
return
false
;
438
}
439
bool
OnDrag
(
Widget
w
,
int
x
,
int
y
)
440
{
441
if
(
UIScriptedWindow
.
GetActiveWindows
())
442
{
443
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
444
{
445
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDrag(
w
,
x
,
y
))
446
return
true
;
447
}
448
}
449
450
return
false
;
451
}
452
bool
OnDragging
(
Widget
w
,
int
x
,
int
y
,
Widget
reciever
)
453
{
454
if
(
UIScriptedWindow
.
GetActiveWindows
())
455
{
456
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
457
{
458
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDragging(
w
,
x
,
y
,
reciever
))
459
return
true
;
460
}
461
}
462
463
return
false
;
464
}
465
bool
OnDraggingOver
(
Widget
w
,
int
x
,
int
y
,
Widget
reciever
)
466
{
467
if
(
UIScriptedWindow
.
GetActiveWindows
())
468
{
469
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
470
{
471
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDraggingOver(
w
,
x
,
y
,
reciever
))
472
return
true
;
473
}
474
}
475
476
return
false
;
477
}
478
bool
OnDrop
(
Widget
w
,
int
x
,
int
y
,
Widget
reciever
)
479
{
480
if
(
UIScriptedWindow
.
GetActiveWindows
())
481
{
482
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
483
{
484
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDrop(
w
,
x
,
y
,
reciever
))
485
return
true
;
486
}
487
}
488
489
return
false
;
490
}
491
bool
OnDropReceived
(
Widget
w
,
int
x
,
int
y
,
Widget
reciever
)
492
{
493
if
(
UIScriptedWindow
.
GetActiveWindows
())
494
{
495
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
496
{
497
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnDropReceived(
w
,
x
,
y
,
reciever
))
498
return
true
;
499
}
500
}
501
502
return
false
;
503
}
504
505
bool
OnEvent
(
EventType
eventType
,
Widget
target
,
int
parameter0
,
int
parameter1
)
506
{
507
if
(
UIScriptedWindow
.
GetActiveWindows
())
508
{
509
for
(
int
i
= 0;
i
<
UIScriptedWindow
.
GetActiveWindows
().
Count
();
i
++)
510
{
511
if
(
UIScriptedWindow
.
GetActiveWindows
().GetElement(
i
).OnEvent(
eventType
,
target
,
parameter0
,
parameter1
))
512
return
true
;
513
}
514
}
515
516
return
false
;
517
}
518
519
ScriptedWidgetEventHandler
GetContextMenu
()
520
{
521
return
null
;
522
}
523
524
bool
OnXboxEvent
(
int
xboxEvent
)
525
{
526
return
true
;
527
}
528
529
void
OnRPC
(
ParamsReadContext
ctx
) {}
530
void
OnRPCEx
(
int
rpc_type
,
ParamsReadContext
ctx
) {}
531
532
void
InitNoteWrite
(
EntityAI
paper
,
EntityAI
pen
,
string
text
=
""
) {}
533
void
InitNoteRead
(
string
text
=
""
) {}
534
void
InitMapItem
(
EntityAI
item
) {}
535
void
LoadMapMarkers
() {}
536
};
x
Icon x
y
Icon y
Count
@ Count
Definition
RandomGeneratorSyncManager.c:7
EntityAI
Definition
Building.c:6
Managed
TODO doc.
Definition
EnScript.c:118
Param3
Definition
EntityAI.c:95
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition
EnWidgets.c:651
Serializer
Serialization general interface. Serializer API works with:
Definition
Serializer.c:56
UIMenuPanel
Part of main menu hierarchy to create custom menus from script.
Definition
UIScriptedMenu.c:3
UIMenuPanel::UseKeyboard
bool UseKeyboard()
Definition
UIScriptedMenu.c:41
UIMenuPanel::~UIScriptedMenu
void ~UIScriptedMenu()
Definition
UIScriptedMenu.c:129
UIMenuPanel::IsAnyMenuVisible
proto native bool IsAnyMenuVisible()
UIMenuPanel::OnDropReceived
bool OnDropReceived(Widget w, int x, int y, Widget reciever)
Definition
UIScriptedMenu.c:491
UIMenuPanel::GetVisibleMenu
proto native UIMenuPanel GetVisibleMenu()
UIMenuPanel::OnXboxEvent
bool OnXboxEvent(int xboxEvent)
Definition
UIScriptedMenu.c:524
UIMenuPanel::OnClick
bool OnClick(Widget w, int x, int y, int button)
Definition
UIScriptedMenu.c:218
UIMenuPanel::layoutRoot
Widget layoutRoot
Definition
UIScriptedMenu.c:72
UIMenuPanel::m_AnimAlphaValue
float m_AnimAlphaValue
Definition
UIScriptedMenu.c:75
UIMenuPanel::SetParentMenu
proto native void SetParentMenu(UIMenuPanel parent)
UIMenuPanel::OnDrag
bool OnDrag(Widget w, int x, int y)
Definition
UIScriptedMenu.c:439
UIMenuPanel::OnRPCEx
void OnRPCEx(int rpc_type, ParamsReadContext ctx)
Definition
UIScriptedMenu.c:530
UIMenuPanel::GetID
override int GetID()
Returns MenuID.
Definition
UIScriptedMenu.c:140
UIMenuPanel::Init
Widget Init()
Definition
UIScriptedMenu.c:153
UIMenuPanel::GetContextMenu
ScriptedWidgetEventHandler GetContextMenu()
Definition
UIScriptedMenu.c:519
UIMenuPanel::SetSubMenu
proto native void SetSubMenu(UIMenuPanel submenu)
UIMenuPanel::m_AnimAlphaWidget
Widget m_AnimAlphaWidget
Definition
UIScriptedMenu.c:73
UIMenuPanel::OnDrop
bool OnDrop(Widget w, int x, int y, Widget reciever)
Definition
UIScriptedMenu.c:478
UIMenuPanel::OnHide
void OnHide()
Definition
UIScriptedMenu.c:169
UIMenuPanel::GetSubMenu
proto native UIMenuPanel GetSubMenu()
UIMenuPanel::SetWidgetAnimAlpha
void SetWidgetAnimAlpha(Widget widget)
Definition
UIScriptedMenu.c:145
UIMenuPanel::UnlockControls
void UnlockControls()
Definition
UIScriptedMenu.c:102
UIMenuPanel::m_id
int m_id
Definition
UIScriptedMenu.c:71
UIMenuPanel::OnFocusLost
bool OnFocusLost(Widget w, int x, int y)
Definition
UIScriptedMenu.c:296
UIMenuPanel::OnItemSelected
bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
Definition
UIScriptedMenu.c:270
UIMenuPanel::DestroySubmenu
proto native void DestroySubmenu()
UIMenuPanel::OnMouseLeave
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
Definition
UIScriptedMenu.c:322
UIMenuPanel::SetFadingPanels
proto native void SetFadingPanels(Widget panel0, Widget panel1, Widget panel2, Widget panel3, Widget panel4)
Refresh request, called from anywhere.
UIMenuPanel::UseMouse
bool UseMouse()
Definition
UIScriptedMenu.c:32
UIMenuPanel::OnRPC
void OnRPC(ParamsReadContext ctx)
Definition
UIScriptedMenu.c:529
UIMenuPanel::InitNoteRead
void InitNoteRead(string text="")
Definition
UIScriptedMenu.c:533
UIMenuPanel::OnKeyDown
bool OnKeyDown(Widget w, int x, int y, int key)
Definition
UIScriptedMenu.c:387
UIMenuPanel::OnDoubleClick
bool OnDoubleClick(Widget w, int x, int y, int button)
Definition
UIScriptedMenu.c:244
UIMenuPanel::UseGamepad
bool UseGamepad()
Definition
UIScriptedMenu.c:50
UIMenuPanel::IsVisible
proto native bool IsVisible()
UIMenuPanel::OnChange
bool OnChange(Widget w, int x, int y, bool finished)
Definition
UIScriptedMenu.c:426
UIMenuPanel::m_AnimAlphaIsIncreasing
bool m_AnimAlphaIsIncreasing
Definition
UIScriptedMenu.c:74
UIMenuPanel::EnterScriptedMenu
proto native UIScriptedMenu EnterScriptedMenu(int id)
Create & open menu with specific id (see MenuID) and set this menu as its parent.
UIMenuPanel::OnSelect
bool OnSelect(Widget w, int x, int y)
Definition
UIScriptedMenu.c:257
UIMenuPanel::OnKeyUp
bool OnKeyUp(Widget w, int x, int y, int key)
Definition
UIScriptedMenu.c:400
UIMenuPanel::OnFocus
bool OnFocus(Widget w, int x, int y)
Definition
UIScriptedMenu.c:283
UIMenuPanel::OnDragging
bool OnDragging(Widget w, int x, int y, Widget reciever)
Definition
UIScriptedMenu.c:452
UIMenuPanel::Refresh
void Refresh()
Refresh request, called from anywhere.
Definition
UIScriptedMenu.c:62
UIMenuPanel::Cleanup
void Cleanup()
Definition
UIScriptedMenu.c:158
UIMenuPanel::OnController
bool OnController(Widget w, int control, int value)
Definition
UIScriptedMenu.c:374
UIMenuPanel::OnVisibilityChanged
void OnVisibilityChanged(bool isVisible)
Definition
UIScriptedMenu.c:25
UIMenuPanel::InitMapItem
void InitMapItem(EntityAI item)
Definition
UIScriptedMenu.c:534
UIMenuPanel::CanClose
proto native bool CanClose()
UIMenuPanel::LoadMapMarkers
void LoadMapMarkers()
Definition
UIScriptedMenu.c:535
UIMenuPanel::InitNoteWrite
void InitNoteWrite(EntityAI paper, EntityAI pen, string text="")
Definition
UIScriptedMenu.c:532
UIMenuPanel::GetID
int GetID()
Returns MenuID.
Definition
UIScriptedMenu.c:56
UIMenuPanel::UIScriptedMenu
void UIScriptedMenu()
Definition
UIScriptedMenu.c:124
UIMenuPanel::Update
void Update(float timeslice)
Per frame update, called from engine.
Definition
UIScriptedMenu.c:175
UIMenuPanel::OnMouseEnter
bool OnMouseEnter(Widget w, int x, int y)
Definition
UIScriptedMenu.c:309
UIMenuPanel::OnModalResult
bool OnModalResult(Widget w, int x, int y, int code, int result)
Definition
UIScriptedMenu.c:231
UIMenuPanel::OnShow
void OnShow()
Definition
UIScriptedMenu.c:163
UIMenuPanel::OnEvent
bool OnEvent(EventType eventType, Widget target, int parameter0, int parameter1)
Definition
UIScriptedMenu.c:505
UIMenuPanel::OnDraggingOver
bool OnDraggingOver(Widget w, int x, int y, Widget reciever)
Definition
UIScriptedMenu.c:465
UIMenuPanel::OnMouseWheel
bool OnMouseWheel(Widget w, int x, int y, int wheel)
Definition
UIScriptedMenu.c:361
UIMenuPanel::OnMouseButtonUp
bool OnMouseButtonUp(Widget w, int x, int y, int button)
Definition
UIScriptedMenu.c:348
UIMenuPanel::LockControls
void LockControls()
Definition
UIScriptedMenu.c:82
UIMenuPanel::CanCloseOnEscape
proto native bool CanCloseOnEscape()
UIMenuPanel::GetParentMenu
proto native UIMenuPanel GetParentMenu()
UIMenuPanel::SetID
void SetID(int id)
Sets MenuID.
Definition
UIScriptedMenu.c:134
UIMenuPanel::Close
proto native void Close()
Safe way to close window, using this function can even window safely close itself.
UIMenuPanel::OnMouseButtonDown
bool OnMouseButtonDown(Widget w, int x, int y, int button)
Definition
UIScriptedMenu.c:335
UIMenuPanel::OnKeyPress
bool OnKeyPress(Widget w, int x, int y, int key)
Definition
UIScriptedMenu.c:413
UIMenuPanel::GetLayoutRoot
Widget GetLayoutRoot()
Definition
UIScriptedMenu.c:77
UIScriptedMenu
Definition
DayZGame.c:64
UIScriptedMenu::UseMouse
override bool UseMouse()
Definition
GesturesMenu.c:248
UIScriptedMenu::UseGamepad
override bool UseGamepad()
Definition
GesturesMenu.c:253
UIScriptedMenu::UseKeyboard
override bool UseKeyboard()
Definition
ChatInputMenu.c:24
UIScriptedWindow
Definition
UIScriptedWindow.c:2
UIScriptedWindow::GetActiveWindows
static map< int, UIScriptedWindow > GetActiveWindows()
Definition
UIScriptedWindow.c:31
Widget
Definition
EnWidgets.c:190
GetGame
proto native CGame GetGame()
INPUT_DEVICE_MOUSE
const int INPUT_DEVICE_MOUSE
Definition
constants.c:24
INPUT_DEVICE_GAMEPAD
const int INPUT_DEVICE_GAMEPAD
Definition
constants.c:28
INPUT_DEVICE_KEYBOARD
const int INPUT_DEVICE_KEYBOARD
Definition
constants.c:23
MENU_UNKNOWN
const int MENU_UNKNOWN
Definition
constants.c:163
scripts
3_Game
tools
UIScriptedMenu.c
Generated by
1.10.0