예제 #1
0
        // monitoring slider
        public static IIgniteGUIGroup AddMonitoringSlider(this IIgniteGUIGroup group, Func <float> monitor, float minValue = 0f, float maxValue = 1f)
        {
            var valueChangeEvent = new IgniteSlider.ValueChangeEvent();
            var slider           = IgniteSlider.Create(v => { }, minValue, maxValue, valueChangeEvent: valueChangeEvent);

            slider.StartCoroutine(MonitoringCoroutine(valueChangeEvent, monitor));
            return(group.Add(slider));
        }
예제 #2
0
        // operable monitoring slider, label
        public static IIgniteGUIGroup AddOperableMonitoringSlider(this IIgniteGUIGroup group, Func <float> monitor, Action <float> onValueChanged, string label, float minValue = 0f, float maxValue = 1f)
        {
            var valueChangeEvent = new IgniteSlider.ValueChangeEvent();
            var slider           = IgniteSlider.Create(onValueChanged, minValue, maxValue, valueChangeEvent: valueChangeEvent);

            slider.StartCoroutine(MonitoringCoroutine(valueChangeEvent, monitor));
            return(group.Add(IgniteHorizontalGroup.Create().Add(slider).AddLabel(label) as IgniteHorizontalGroup));
        }
예제 #3
0
        // label, monitoring slider
        public static IIgniteGUIGroup AddMonitoringSlider(this IIgniteGUIGroup group, string label, Func <float> monitor, float minValue, float maxValue)
        {
            var valueChangeEvent = new IgniteSlider.ValueChangeEvent();
            var slider           = IgniteSlider.Create(v => { }, minValue, maxValue, valueChangeEvent: valueChangeEvent);

            slider.StartCoroutine(MonitoringCoroutine(valueChangeEvent, monitor));
            return(group.Add(IgniteHorizontalGroup.Create().AddLabel(label).Add(slider) as IgniteHorizontalGroup));
        }
예제 #4
0
 // slider, label
 public static IIgniteGUIGroup AddSlider(this IIgniteGUIGroup group, Action <float> onValueChanged, string label, float minValue = 0f, float maxValue = 1f, bool wholeNumbers = false, UnityEvent <float> valueChangeEvent = null, float initialValue = 0f)
 {
     return(group.Add(IgniteHorizontalGroup.Create().Add(IgniteSlider.Create(onValueChanged, minValue, maxValue, wholeNumbers, valueChangeEvent, initialValue)).AddLabel(label) as IgniteHorizontalGroup));
 }