Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ItemSplitDialog.c
Go to the documentation of this file.
2 {
3  protected SCR_SliderComponent m_Slider;
4  protected IEntity m_EntityTo;
5  protected IEntity m_EntityFrom;
6 
7  //------------------------------------------------------------------------------------------------
8  override void HandlerAttached(Widget w)
9  {
10  super.HandlerAttached(w);
11 
12  Widget slider = w.FindAnyWidget("Slider");
13  m_Slider = SCR_SliderComponent.Cast(slider.FindHandler(SCR_SliderComponent));
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  protected void SetSliderMax(float max)
18  {
19  m_Slider.SetSliderSettings(0, max, 1);
20  }
21 
22  //------------------------------------------------------------------------------------------------
23  protected void SetSliderValue(float value)
24  {
25  m_Slider.SetValue(value);
26  }
27 
28  //------------------------------------------------------------------------------------------------
29  float GetSliderValue()
30  {
31  return m_Slider.GetValue();
32  }
33 
34  //------------------------------------------------------------------------------------------------
35  IEntity GetEntityTo()
36  {
37  return m_EntityTo;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  IEntity GetEntityFrom()
42  {
43  return m_EntityFrom;
44  }
45 
46  //------------------------------------------------------------------------------------------------
47  protected void SetEntityTo(IEntity entityTo)
48  {
49  m_EntityTo = entityTo;
50  }
51 
52  //------------------------------------------------------------------------------------------------
53  protected void SetEntityFrom(IEntity entityFrom)
54  {
55  m_EntityFrom = entityFrom;
56  }
57 
58  //------------------------------------------------------------------------------------------------
59  static SCR_ItemSplitDialog Create(float max = 1, IEntity entityTo = null, IEntity entityFrom = null)
60  {
62  SCR_ConfigurableDialogUi.CreateFromPreset("{A4F929B76A255B4F}Configs/Inventory/InventoryDialogPreset.conf", "ITEM_SPLIT", dialogUI);
63  dialogUI.SetSliderMax(max);
64  dialogUI.SetSliderValue(max);
65  dialogUI.SetEntityTo(entityTo);
66  dialogUI.SetEntityFrom(entityFrom);
67 
68  return dialogUI;
69  }
70 }
SCR_SliderComponent
Definition: SCR_SliderComponent.c:2
SCR_ItemSplitDialog
Definition: SCR_ItemSplitDialog.c:1
SCR_ConfigurableDialogUi
Definition: SCR_ConfigurableDialogUI.c:13