DayZ 1.24
Loading...
Searching...
No Matches
UIMenuPanel Class Reference

Part of main menu hierarchy to create custom menus from script. More...

Inheritance diagram for UIMenuPanel:
[legend]
Collaboration diagram for UIMenuPanel:
[legend]

Private Member Functions

proto native UIMenuPanel GetSubMenu ()
 
proto native UIMenuPanel GetParentMenu ()
 
proto native UIMenuPanel GetVisibleMenu ()
 
proto native void SetSubMenu (UIMenuPanel submenu)
 
proto native void SetParentMenu (UIMenuPanel parent)
 
proto native bool CanClose ()
 
proto native bool CanCloseOnEscape ()
 
proto native UIScriptedMenu EnterScriptedMenu (int id)
 Create & open menu with specific id (see MenuID) and set this menu as its parent.
 
proto native void DestroySubmenu ()
 
proto native bool IsAnyMenuVisible ()
 
proto native bool IsVisible ()
 
void OnVisibilityChanged (bool isVisible)
 
proto native void Close ()
 Safe way to close window, using this function can even window safely close itself.
 
bool UseMouse ()
 
bool UseKeyboard ()
 
bool UseGamepad ()
 
int GetID ()
 Returns MenuID.
 
void Refresh ()
 Refresh request, called from anywhere.
 
Widget GetLayoutRoot ()
 
void LockControls ()
 
void UnlockControls ()
 
void UIScriptedMenu ()
 
void ~UIScriptedMenu ()
 
void SetID (int id)
 Sets MenuID.
 
override int GetID ()
 Returns MenuID.
 
void SetWidgetAnimAlpha (Widget widget)
 
Widget Init ()
 
void Cleanup ()
 
void OnShow ()
 
void OnHide ()
 
void Update (float timeslice)
 Per frame update, called from engine.
 
proto native void SetFadingPanels (Widget panel0, Widget panel1, Widget panel2, Widget panel3, Widget panel4)
 Refresh request, called from anywhere.
 
bool OnClick (Widget w, int x, int y, int button)
 
bool OnModalResult (Widget w, int x, int y, int code, int result)
 
bool OnDoubleClick (Widget w, int x, int y, int button)
 
bool OnSelect (Widget w, int x, int y)
 
bool OnItemSelected (Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
 
bool OnFocus (Widget w, int x, int y)
 
bool OnFocusLost (Widget w, int x, int y)
 
bool OnMouseEnter (Widget w, int x, int y)
 
bool OnMouseLeave (Widget w, Widget enterW, int x, int y)
 
bool OnMouseButtonDown (Widget w, int x, int y, int button)
 
bool OnMouseButtonUp (Widget w, int x, int y, int button)
 
bool OnMouseWheel (Widget w, int x, int y, int wheel)
 
bool OnController (Widget w, int control, int value)
 
bool OnKeyDown (Widget w, int x, int y, int key)
 
bool OnKeyUp (Widget w, int x, int y, int key)
 
bool OnKeyPress (Widget w, int x, int y, int key)
 
bool OnChange (Widget w, int x, int y, bool finished)
 
bool OnDrag (Widget w, int x, int y)
 
bool OnDragging (Widget w, int x, int y, Widget reciever)
 
bool OnDraggingOver (Widget w, int x, int y, Widget reciever)
 
bool OnDrop (Widget w, int x, int y, Widget reciever)
 
bool OnDropReceived (Widget w, int x, int y, Widget reciever)
 
bool OnEvent (EventType eventType, Widget target, int parameter0, int parameter1)
 
ScriptedWidgetEventHandler GetContextMenu ()
 
bool OnXboxEvent (int xboxEvent)
 
void OnRPC (ParamsReadContext ctx)
 
void OnRPCEx (int rpc_type, ParamsReadContext ctx)
 
void InitNoteWrite (EntityAI paper, EntityAI pen, string text="")
 
void InitNoteRead (string text="")
 
void InitMapItem (EntityAI item)
 
void LoadMapMarkers ()
 
- Private Member Functions inherited from Managed
void IntroSceneCharacter ()
 
void ~IntroSceneCharacter ()
 
bool IsDefaultCharacter ()
 
void SetToDefaultCharacter ()
 
void SetCharacterID (int char_id)
 
int GetCharacterID ()
 
PlayerBase GetCharacterObj ()
 
TStringArray GetCharGenderList ()
 
TStringArray GetCharList (ECharGender gender)
 
TStringArray GetCharShirtsList ()
 
TStringArray GetCharPantsList ()
 
TStringArray GetCharShoesList ()
 
void SetCharacterGender (ECharGender gender)
 
bool IsCharacterFemale ()
 
ECharGender GetCharacterGender ()
 
vector GetPosition ()
 
int GetNextCharacterID ()
 
int GetPrevCharacterID ()
 
void CreateNewCharacterRandom ()
 
void CreateNewCharacterById (int character_id)
 
void CreateNewCharacterByName (string character_name, bool randomize_equip=true)
 
void CreateDefaultCharacter ()
 
void GetLastPlayedServer (int characterID, out string address, out string name, out int port)
 
void CreateNewCharacter ()
 
void LoadCharacterData (vector char_pos, vector char_rot, bool default_char=false)
 Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.
 
void CharacterUnload ()
 
void CharacterLoad (int character_id, vector char_pos, vector char_rot)
 
void SetupPlayerName (bool new_name)
 
void SetAttachment (string type, int slot)
 
string GetCharacterNameById (int char_id)
 
string GetCharacterName ()
 
void SaveCharName (string name)
 
void SaveDefaultCharacter ()
 
void TransferValues (PlayerBase player)
 
void Init ()
 
void OnScheduledTick (float deltatime)
 
void CheckValues ()
 
float GetBlood ()
 
float GetHealth ()
 
void CheckHealth ()
 
void CheckBlood ()
 
void SendInitValues ()
 Sends values on object creation.
 
void SendValue (int value_type, float value)
 
void ReceiveValue (int value_type, float value)
 
void OnRPC (ParamsReadContext ctx)
 
void ShowDebugValues (bool show)
 
void BleedingIndicator (int source_ID, int severity, GameplayEffectsDataBleeding parent)
 
void InitIndicator (vector position)
 
void StopIndicator (bool instant=false)
 
void StartRunningDrops ()
 
bool IsRunningDrops ()
 Are any drops currently being animated?
 
void TrySpawnNextDrop ()
 
void ResetSequence ()
 
void ResetIndicator ()
 
void Update (float timeSlice)
 
bool GetEndNow ()
 
int GetSeverity ()
 
void GameplayEffectsData (array< ref Widget > input, int type, int user_override=-1)
 
void Init (array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
 
array< ref WidgetGetWidgetSet ()
 
int GetWidgetSetType ()
 
int GetWidgetSetID ()
 
bool HasDefinedHandle ()
 Returns 'true' if this class contains update info.
 
bool DataInitialized ()
 
void UpdateVisibility (bool state)
 
void RegisterData (Param p)
 
void Update (float timeSlice=0, Param p=null, int handle=-1)
 
void ForceStop ()
 

Private Attributes

int m_id
 
Widget layoutRoot
 
Widget m_AnimAlphaWidget
 
bool m_AnimAlphaIsIncreasing
 
float m_AnimAlphaValue
 
- Private Attributes inherited from Managed
int m_CharacterId
 
string m_CharacterType
 
MenuData m_CharacterDta
 
PlayerBase m_CharacterObj
 
vector m_CharacterPos
 
vector m_CharacterRot
 
ref TStringArray m_CharGenderList = new TStringArray
 
ref TStringArray m_CharShirtList = new TStringArray
 
ref TStringArray m_CharPantsList = new TStringArray
 
ref TStringArray m_CharShoesList = new TStringArray
 
ref map< ECharGender, ref array< string > > m_Characters = new map<ECharGender, ref array<string>>
 
ECharGender m_CharGender
 
bool m_InitialSyncSent
 
bool m_Initialized
 
bool m_Terminating = false
 
bool m_EndNow = false
 
bool m_IsRunning = false
 
int m_DropSpawnsQueued
 
int m_ActiveDropsCount
 
int m_Severity
 
int m_SourceID
 
GameplayEffectsDataBleeding m_ParentMetaData
 
array< floatm_DropProbabilityArray
 
float m_AverageFrequency
 
float m_SequenceTick
 
float m_SequenceDuration
 
float m_TimeElapsedTotal
 
float m_TimeElapsedSequence
 
float m_LastDropSpawnTime
 
float m_DropSpawnMinDelay
 
float m_DropSpawnMaxDelay
 
int m_CurrentDropProbabilityStep
 
int m_DropProbabilityRollsCount
 
vector m_BasePosition
 
ref set< ref BleedingIndicatorDropDatam_ActiveDrops
 
ref set< intm_CleanupQueue
 
ref array< ref Widgetm_WidgetArray
 
int m_Type
 
int m_WidgetSetIdentifier
 
Widget m_LayoutRoot
 

Detailed Description

Part of main menu hierarchy to create custom menus from script.

Definition at line 2 of file UIScriptedMenu.c.

Constructor & Destructor Documentation

◆ ~UIScriptedMenu()

void UIMenuPanel::~UIScriptedMenu ( )
inlineprivate

Definition at line 129 of file UIScriptedMenu.c.

130 {
131 }

Member Function Documentation

◆ CanClose()

proto native bool UIMenuPanel::CanClose ( )
private

◆ CanCloseOnEscape()

proto native bool UIMenuPanel::CanCloseOnEscape ( )
private

◆ Cleanup()

void UIMenuPanel::Cleanup ( )
inlineprivate

Definition at line 158 of file UIScriptedMenu.c.

159 {
160 }

◆ Close()

proto native void UIMenuPanel::Close ( )
private

Safe way to close window, using this function can even window safely close itself.

◆ DestroySubmenu()

proto native void UIMenuPanel::DestroySubmenu ( )
private

◆ EnterScriptedMenu()

proto native UIScriptedMenu UIMenuPanel::EnterScriptedMenu ( int id)
private

Create & open menu with specific id (see MenuID) and set this menu as its parent.

Referenced by MissionBase::CreateLogoutMenu().

◆ GetContextMenu()

ScriptedWidgetEventHandler UIMenuPanel::GetContextMenu ( )
inlineprivate

Definition at line 519 of file UIScriptedMenu.c.

520 {
521 return null;
522 }

◆ GetID() [1/2]

int UIMenuPanel::GetID ( )
inlineprivate

Returns MenuID.

Definition at line 56 of file UIScriptedMenu.c.

57 {
58 return MENU_UNKNOWN;
59 }
const int MENU_UNKNOWN
Definition constants.c:163

References MENU_UNKNOWN.

◆ GetID() [2/2]

override int UIMenuPanel::GetID ( )
inlineprivate

Returns MenuID.

Definition at line 140 of file UIScriptedMenu.c.

141 {
142 return m_id;
143 }

◆ GetLayoutRoot()

Widget UIMenuPanel::GetLayoutRoot ( )
inlineprivate

Definition at line 77 of file UIScriptedMenu.c.

78 {
79 return layoutRoot;
80 }
Widget layoutRoot

◆ GetParentMenu()

proto native UIMenuPanel UIMenuPanel::GetParentMenu ( )
private

◆ GetSubMenu()

proto native UIMenuPanel UIMenuPanel::GetSubMenu ( )
private

◆ GetVisibleMenu()

proto native UIMenuPanel UIMenuPanel::GetVisibleMenu ( )
private

◆ Init()

Widget UIMenuPanel::Init ( )
inlineprivate

Definition at line 153 of file UIScriptedMenu.c.

154 {
155 return NULL;
156 }

◆ InitMapItem()

void UIMenuPanel::InitMapItem ( EntityAI item)
inlineprivate

Definition at line 534 of file UIScriptedMenu.c.

534{}

◆ InitNoteRead()

void UIMenuPanel::InitNoteRead ( string text = "")
inlineprivate

Definition at line 533 of file UIScriptedMenu.c.

533{}

◆ InitNoteWrite()

void UIMenuPanel::InitNoteWrite ( EntityAI paper,
EntityAI pen,
string text = "" )
inlineprivate

Definition at line 532 of file UIScriptedMenu.c.

532{}

◆ IsAnyMenuVisible()

proto native bool UIMenuPanel::IsAnyMenuVisible ( )
private

◆ IsVisible()

proto native bool UIMenuPanel::IsVisible ( )
private

◆ LoadMapMarkers()

void UIMenuPanel::LoadMapMarkers ( )
inlineprivate

Definition at line 535 of file UIScriptedMenu.c.

535{}

◆ LockControls()

void UIMenuPanel::LockControls ( )
inlineprivate

Definition at line 82 of file UIScriptedMenu.c.

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 }
bool UseKeyboard()
bool UseGamepad()
proto native CGame GetGame()
const int INPUT_DEVICE_MOUSE
Definition constants.c:24
const int INPUT_DEVICE_GAMEPAD
Definition constants.c:28
const int INPUT_DEVICE_KEYBOARD
Definition constants.c:23

References GetGame(), INPUT_DEVICE_GAMEPAD, INPUT_DEVICE_KEYBOARD, INPUT_DEVICE_MOUSE, UIScriptedMenu::UseGamepad(), UIScriptedMenu::UseKeyboard(), and UIScriptedMenu::UseMouse().

◆ OnChange()

bool UIMenuPanel::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprivate

Definition at line 426 of file UIScriptedMenu.c.

427 {
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 }
Icon x
Icon y
static map< int, UIScriptedWindow > GetActiveWindows()

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnClick()

bool UIMenuPanel::OnClick ( Widget w,
int x,
int y,
int button )
inlineprivate

Definition at line 218 of file UIScriptedMenu.c.

219 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnController()

bool UIMenuPanel::OnController ( Widget w,
int control,
int value )
inlineprivate

Definition at line 374 of file UIScriptedMenu.c.

375 {
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 }

References Count, and UIScriptedWindow::GetActiveWindows().

◆ OnDoubleClick()

bool UIMenuPanel::OnDoubleClick ( Widget w,
int x,
int y,
int button )
inlineprivate

Definition at line 244 of file UIScriptedMenu.c.

245 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnDrag()

bool UIMenuPanel::OnDrag ( Widget w,
int x,
int y )
inlineprivate

Definition at line 439 of file UIScriptedMenu.c.

440 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnDragging()

bool UIMenuPanel::OnDragging ( Widget w,
int x,
int y,
Widget reciever )
inlineprivate

Definition at line 452 of file UIScriptedMenu.c.

453 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnDraggingOver()

bool UIMenuPanel::OnDraggingOver ( Widget w,
int x,
int y,
Widget reciever )
inlineprivate

Definition at line 465 of file UIScriptedMenu.c.

466 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnDrop()

bool UIMenuPanel::OnDrop ( Widget w,
int x,
int y,
Widget reciever )
inlineprivate

Definition at line 478 of file UIScriptedMenu.c.

479 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnDropReceived()

bool UIMenuPanel::OnDropReceived ( Widget w,
int x,
int y,
Widget reciever )
inlineprivate

Definition at line 491 of file UIScriptedMenu.c.

492 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnEvent()

bool UIMenuPanel::OnEvent ( EventType eventType,
Widget target,
int parameter0,
int parameter1 )
inlineprivate

Definition at line 505 of file UIScriptedMenu.c.

506 {
508 {
509 for (int i = 0; i < UIScriptedWindow.GetActiveWindows().Count(); i++)
510 {
512 return true;
513 }
514 }
515
516 return false;
517 }

References Count, and UIScriptedWindow::GetActiveWindows().

◆ OnFocus()

bool UIMenuPanel::OnFocus ( Widget w,
int x,
int y )
inlineprivate

Definition at line 283 of file UIScriptedMenu.c.

284 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnFocusLost()

bool UIMenuPanel::OnFocusLost ( Widget w,
int x,
int y )
inlineprivate

Definition at line 296 of file UIScriptedMenu.c.

297 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnHide()

void UIMenuPanel::OnHide ( )
inlineprivate

Definition at line 169 of file UIScriptedMenu.c.

170 {
172 }
void UnlockControls()

◆ OnItemSelected()

bool UIMenuPanel::OnItemSelected ( Widget w,
int x,
int y,
int row,
int column,
int oldRow,
int oldColumn )
inlineprivate

Definition at line 270 of file UIScriptedMenu.c.

271 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnKeyDown()

bool UIMenuPanel::OnKeyDown ( Widget w,
int x,
int y,
int key )
inlineprivate

Definition at line 387 of file UIScriptedMenu.c.

388 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnKeyPress()

bool UIMenuPanel::OnKeyPress ( Widget w,
int x,
int y,
int key )
inlineprivate

Definition at line 413 of file UIScriptedMenu.c.

414 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnKeyUp()

bool UIMenuPanel::OnKeyUp ( Widget w,
int x,
int y,
int key )
inlineprivate

Definition at line 400 of file UIScriptedMenu.c.

401 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnModalResult()

bool UIMenuPanel::OnModalResult ( Widget w,
int x,
int y,
int code,
int result )
inlineprivate

Definition at line 231 of file UIScriptedMenu.c.

232 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnMouseButtonDown()

bool UIMenuPanel::OnMouseButtonDown ( Widget w,
int x,
int y,
int button )
inlineprivate

Definition at line 335 of file UIScriptedMenu.c.

336 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnMouseButtonUp()

bool UIMenuPanel::OnMouseButtonUp ( Widget w,
int x,
int y,
int button )
inlineprivate

Definition at line 348 of file UIScriptedMenu.c.

349 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnMouseEnter()

bool UIMenuPanel::OnMouseEnter ( Widget w,
int x,
int y )
inlineprivate

Definition at line 309 of file UIScriptedMenu.c.

310 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnMouseLeave()

bool UIMenuPanel::OnMouseLeave ( Widget w,
Widget enterW,
int x,
int y )
inlineprivate

Definition at line 322 of file UIScriptedMenu.c.

323 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnMouseWheel()

bool UIMenuPanel::OnMouseWheel ( Widget w,
int x,
int y,
int wheel )
inlineprivate

Definition at line 361 of file UIScriptedMenu.c.

362 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnRPC()

void UIMenuPanel::OnRPC ( ParamsReadContext ctx)
inlineprivate

Definition at line 529 of file UIScriptedMenu.c.

529{}

◆ OnRPCEx()

void UIMenuPanel::OnRPCEx ( int rpc_type,
ParamsReadContext ctx )
inlineprivate

Definition at line 530 of file UIScriptedMenu.c.

530{}

◆ OnSelect()

bool UIMenuPanel::OnSelect ( Widget w,
int x,
int y )
inlineprivate

Definition at line 257 of file UIScriptedMenu.c.

258 {
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 }

References Count, UIScriptedWindow::GetActiveWindows(), x, and y.

◆ OnShow()

void UIMenuPanel::OnShow ( )
inlineprivate

Definition at line 163 of file UIScriptedMenu.c.

164 {
165 LockControls();
166 }
void LockControls()

◆ OnVisibilityChanged()

void UIMenuPanel::OnVisibilityChanged ( bool isVisible)
inlineprivate

If visibility of application is changed. On console it is called when application is suspended or constrained.

Parameters
isVisibleindicate if application is visible in foreground

Definition at line 25 of file UIScriptedMenu.c.

26 {
27 }

◆ OnXboxEvent()

bool UIMenuPanel::OnXboxEvent ( int xboxEvent)
inlineprivate

Definition at line 524 of file UIScriptedMenu.c.

525 {
526 return true;
527 }

◆ Refresh()

void UIMenuPanel::Refresh ( )
inlineprivate

Refresh request, called from anywhere.

Definition at line 62 of file UIScriptedMenu.c.

63 {
64 }

◆ SetFadingPanels()

proto native void UIMenuPanel::SetFadingPanels ( Widget panel0,
Widget panel1,
Widget panel2,
Widget panel3,
Widget panel4 )
private

Refresh request, called from anywhere.

◆ SetID()

void UIMenuPanel::SetID ( int id)
inlineprivate

Sets MenuID.

Definition at line 134 of file UIScriptedMenu.c.

135 {
136 m_id = id;
137 }

◆ SetParentMenu()

proto native void UIMenuPanel::SetParentMenu ( UIMenuPanel parent)
private

◆ SetSubMenu()

proto native void UIMenuPanel::SetSubMenu ( UIMenuPanel submenu)
private

◆ SetWidgetAnimAlpha()

void UIMenuPanel::SetWidgetAnimAlpha ( Widget widget)
inlineprivate

Definition at line 145 of file UIScriptedMenu.c.

146 {
147 m_AnimAlphaValue = 0.3;
149 }
float m_AnimAlphaValue
Widget m_AnimAlphaWidget

◆ UIScriptedMenu()

void UIMenuPanel::UIScriptedMenu ( )
inlineprivate

Definition at line 124 of file UIScriptedMenu.c.

125 {
127 }

References MENU_UNKNOWN.

◆ UnlockControls()

void UIMenuPanel::UnlockControls ( )
inlineprivate

Definition at line 102 of file UIScriptedMenu.c.

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
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 }
proto native UIMenuPanel GetParentMenu()

References GetGame(), INPUT_DEVICE_GAMEPAD, INPUT_DEVICE_KEYBOARD, INPUT_DEVICE_MOUSE, UIScriptedMenu::UseGamepad(), UIScriptedMenu::UseKeyboard(), and UIScriptedMenu::UseMouse().

◆ Update()

void UIMenuPanel::Update ( float timeslice)
inlineprivate

Per frame update, called from engine.

Definition at line 175 of file UIScriptedMenu.c.

176 {
177#ifdef PLATFORM_CONSOLE
179 {
180 float anim_speed = 1.2;
181 float anim_value_max = 1.0;
182 float anim_value_min = 0.3;
184 {
186
188 {
191 }
192 }
193 else
194 {
196
198 {
201 }
202 }
203
204
206 }
207#endif
208 }
bool m_AnimAlphaIsIncreasing

◆ UseGamepad()

bool UIMenuPanel::UseGamepad ( )
inlineprivate

Definition at line 50 of file UIScriptedMenu.c.

51 {
52 return true;
53 }

◆ UseKeyboard()

bool UIMenuPanel::UseKeyboard ( )
inlineprivate

Definition at line 41 of file UIScriptedMenu.c.

42 {
43#ifdef PLATFORM_CONSOLE
44 return GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
45#else
46 return true;
47#endif
48 }

References GetGame().

◆ UseMouse()

bool UIMenuPanel::UseMouse ( )
inlineprivate

Definition at line 32 of file UIScriptedMenu.c.

33 {
34#ifdef PLATFORM_CONSOLE
35 return GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
36#else
37 return true;
38#endif
39 }

References GetGame().

Member Data Documentation

◆ layoutRoot

Widget UIMenuPanel::layoutRoot
private

Definition at line 72 of file UIScriptedMenu.c.

◆ m_AnimAlphaIsIncreasing

bool UIMenuPanel::m_AnimAlphaIsIncreasing
private

Definition at line 74 of file UIScriptedMenu.c.

◆ m_AnimAlphaValue

float UIMenuPanel::m_AnimAlphaValue
private

Definition at line 75 of file UIScriptedMenu.c.

◆ m_AnimAlphaWidget

Widget UIMenuPanel::m_AnimAlphaWidget
private

Definition at line 73 of file UIScriptedMenu.c.

◆ m_id

int UIMenuPanel::m_id
private

Definition at line 71 of file UIScriptedMenu.c.


The documentation for this class was generated from the following file: