Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
hitdirectionimagesbase.c
Go to the documentation of this file.
1 
3 {
4  int m_ImageIndex;
5 
7  {
8  if ( (!GetTypeLayoutPathArray() && !GetTypeImagePathArray()) )
9  {
10  PerformRegisterImages();
11  }
12 
13  RandomizeImageIdx();
14  }
15 
16  protected void PerformRegisterImages()
17  {
18  /*
19  RegisterImage("gui/layouts/gameplay/HitDirectionIndication.layout","Single_indicator_Splash_1");
20  RegisterImage("gui/layouts/gameplay/HitDirectionIndication.layout","Single_indicator_Splash_2");
21  ...
22  */
23  }
24 
25  protected void RegisterImage(string layout_path, string image_name)
26  {
27  GetTypeLayoutPathArray().Insert(layout_path);
28  GetTypeImagePathArray().Insert(image_name);
29  }
30 
31  protected void RandomizeImageIdx()
32  {
33  m_ImageIndex = Math.RandomIntInclusive(0,GetTypeImagePathArray().Count() - 1);
34  }
35 
36  protected array<string> GetTypeLayoutPathArray(){}
37  protected array<string> GetTypeImagePathArray(){}
38 
40  void GetCurrentImageData(out Widget layout, out Widget image)
41  {
42  layout = GetGame().GetWorkspace().CreateWidgets(GetTypeLayoutPathArray()[m_ImageIndex]);
43  image = layout.FindAnyWidget(GetTypeImagePathArray()[m_ImageIndex]);
44  }
45 }
GetGame
proto native CGame GetGame()
HitDirectionImagesBase
Definition: hitdirectionimagesbase.c:2
array< string >
Widget
Definition: enwidgets.c:189
Math
Definition: enmath.c:6
Count
@ Count
Definition: randomgeneratorsyncmanager.c:7