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

This Option Selector handles a Slider Marker, which basically has 2 sliders One slider is for selecting the value, and the other slider is for displaying some other value/ information. More...

Protected Member Functions

void OptionSelectorLevelMarker (Widget parent, float value, ScriptedWidgetEventHandler parentMenu, bool disabled, float min, float max)
 
override void Enable ()
 
override void Disable ()
 
void SetSlider2Value (float value)
 
override bool OnUpdate (Widget w)
 

Protected Attributes

SliderWidget m_Slider2
 

Private Member Functions

void OptionSelectorSlider (Widget parent, float value, ScriptedWidgetEventHandler parent_menu, bool disabled, float min, float max)
 

Detailed Description

This Option Selector handles a Slider Marker, which basically has 2 sliders One slider is for selecting the value, and the other slider is for displaying some other value/ information.

Parameters
m_Slider2other slider value, which can be used to convery some other info to the player

Definition at line 6 of file OptionSelectorLevelMarker.c.

Member Function Documentation

◆ Disable()

override void OptionSelectorSliderSetup::Disable ( )
inlineprotected

Definition at line 42 of file OptionSelectorLevelMarker.c.

43 {
44 super.Disable();
45 m_Slider2.SetFlags(WidgetFlags.IGNOREPOINTER);
46 }
WidgetFlags
Definition EnWidgets.c:58

◆ Enable()

override void OptionSelectorSliderSetup::Enable ( )
inlineprotected

Definition at line 36 of file OptionSelectorLevelMarker.c.

37 {
38 super.Enable();
39 m_Slider2.ClearFlags(WidgetFlags.IGNOREPOINTER);
40 }

Referenced by OptionSelectorLevelMarker(), and OptionSelectorSlider().

◆ OnUpdate()

override bool OptionSelectorSliderSetup::OnUpdate ( Widget w)
inlineprotected

Definition at line 53 of file OptionSelectorLevelMarker.c.

54 {
55 return false;
56 }

◆ OptionSelectorLevelMarker()

void OptionSelectorSliderSetup::OptionSelectorLevelMarker ( Widget parent,
float value,
ScriptedWidgetEventHandler parentMenu,
bool disabled,
float min,
float max )
inlineprotected

Definition at line 10 of file OptionSelectorLevelMarker.c.

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
28
29 SetValue(value, false);
31 Enable();
32
33 m_Parent.SetHandler(this);
34 }
override void SetValue(int value, bool fire_event=true)
Widget m_Root
Definition SizeToChild.c:85
Widget m_Parent
Definition SizeToChild.c:86
float m_MaxValue
float m_MinValue
proto native CGame GetGame()

References Enable(), GetGame(), m_MaxValue, m_MinValue, m_Parent, m_Root, SetSlider2Value(), and SetValue().

◆ OptionSelectorSlider()

void OptionSelectorSliderSetup::OptionSelectorSlider ( Widget parent,
float value,
ScriptedWidgetEventHandler parent_menu,
bool disabled,
float min,
float max )
inlineprivate

Definition at line 3 of file OptionSelectorSlider.c.

4 {
5 m_Root = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/option_slider.layout", parent);
6#ifdef PLATFORM_CONSOLE
7 m_Parent = parent.GetParent().GetParent();
8#else
9#ifdef PLATFORM_WINDOWS
10 m_Parent = parent.GetParent();
11#endif
12#endif
13
14 m_SelectorType = 1;
15 m_ParentClass = parent_menu;
16 m_Slider = SliderWidget.Cast(m_Root.FindAnyWidget("option_value"));
17 m_Slider.SetCurrent(value);
18
21
23 Enable();
24
25 m_Parent.SetHandler(this);
26 }

References Enable(), GetGame(), m_MaxValue, m_MinValue, m_Parent, m_Root, and SetValue().

◆ SetSlider2Value()

void OptionSelectorSliderSetup::SetSlider2Value ( float value)
inlineprotected

Definition at line 48 of file OptionSelectorLevelMarker.c.

49 {
50 m_Slider2.SetCurrent(NormalizeInput(value));
51 }

Referenced by OptionSelectorLevelMarker().

Member Data Documentation

◆ m_Slider2

SliderWidget OptionSelectorSliderSetup::m_Slider2
protected

Definition at line 8 of file OptionSelectorLevelMarker.c.


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