Beispiel #1
0
 public IntElement(string text, Color color, int minValue, int maxValue, int increment, int startValue, Action <int> onValueChanged, string units = "", string subtitleText = "") : base(text, color, subtitleText)
 {
     this.minValue       = minValue;
     this.maxValue       = maxValue;
     this.increment      = increment;
     this.units          = units;
     this.value          = startValue;
     this.onValueChanged = new IntElement.OnValueChanged(onValueChanged.Invoke);
 }
Beispiel #2
0
        // Token: 0x06000056 RID: 86 RVA: 0x00003DB8 File Offset: 0x00001FB8
        public override void OnRight()
        {
            int num = this.value;

            num += this.increment;
            if (num > this.maxValue)
            {
                num = this.minValue;
            }
            this.value = num;
            IntElement.OnValueChanged onValueChanged = this.onValueChanged;
            if (onValueChanged != null)
            {
                onValueChanged(this.value);
            }
            this.Render(base.GetTextObject());
        }