Ballz.Menu.SpinBox.SpinBox C# (CSharp) Method

SpinBox() public method

public SpinBox ( string name, Settings selectedValue, int _min, int _max, bool selectable = true ) : System
name string
selectedValue Settings
_min int
_max int
selectable bool
return System
        public SpinBox(string name, Settings.Setting<int> selectedValue, int _min, int _max, bool selectable = true)
            : base(name, selectable)
        {
            SelectedChoice = selectedValue;
            min = _min;
            max = _max;

            OnSelect += () =>
            {
                if (!Active)
                {
                    ActiveChanged = true;
                    Active = true;
                }
                else
                    ActiveChanged = false;
            };
            OnUnSelect += () =>
            {
                if (Active)
                {
                    ActiveChanged = true;
                    Active = false;
                }
                else
                    ActiveChanged = false;
            };

            OnSelect += SelectionChanged;
            OnUnSelect += SelectionChanged;
        }