Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
optionselectorlevelmarker.c
Go to the documentation of this file.
1 
6 class OptionSelectorLevelMarker extends OptionSelectorSliderSetup
7 {
8  protected SliderWidget m_Slider2;
9 
10  void OptionSelectorLevelMarker(Widget parent, float value, ScriptedWidgetEventHandler parentMenu, bool disabled, float min, float max)
11  {
12  m_Root = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/option_level_marker.layout", parent);
13  #ifdef PLATFORM_CONSOLE
14  m_Parent = parent.GetParent().GetParent();
15  #else
16  #ifdef PLATFORM_WINDOWS
17  m_Parent = parent.GetParent();
18  #endif
19  #endif
20 
21  m_SelectorType = 1;
22  m_ParentClass = parentMenu;
23  m_Slider = SliderWidget.Cast(m_Root.FindAnyWidget("marker_value"));
24  m_Slider2 = SliderWidget.Cast(m_Root.FindAnyWidget("other_slider_value"));
25 
26  m_MinValue = min;
27  m_MaxValue = max;
28 
29  SetValue(value, false);
30  SetSlider2Value(0);
31  Enable();
32 
33  m_Parent.SetHandler(this);
34  }
35 
36  override void Enable()
37  {
38  super.Enable();
39  m_Slider2.ClearFlags(WidgetFlags.IGNOREPOINTER);
40  }
41 
42  override void Disable()
43  {
44  super.Disable();
45  m_Slider2.SetFlags(WidgetFlags.IGNOREPOINTER);
46  }
47 
48  void SetSlider2Value(float value)
49  {
50  m_Slider2.SetCurrent(NormalizeInput(value));
51  }
52 
53  override bool OnUpdate(Widget w)
54  {
55  return false;
56  }
57 }
GetGame
proto native CGame GetGame()
OptionSelectorSliderSetup
This Option Selector handles a Slider Marker, which basically has 2 sliders One slider is for selecti...
Definition: optionselectorlevelmarker.c:6
m_MinValue
float m_MinValue
Definition: staminahandler.c:139
m_Parent
protected Widget m_Parent
Definition: sizetochild.c:92
Enable
proto native void Enable(bool enable)
OnUpdate
proto native void OnUpdate()
Definition: tools.c:349
WidgetFlags
WidgetFlags
Definition: enwidgets.c:57
m_MaxValue
float m_MaxValue
Definition: staminahandler.c:139
Widget
Definition: enwidgets.c:189
m_Root
protected Widget m_Root
Definition: sizetochild.c:91
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition: enwidgets.c:650
SetValue
override void SetValue(int value, bool fire_event=true)
Definition: optionselectormultistate.c:226