Example #1
0
        // Barpressed zu kleines Rec (ersma weg) und Barscroll setzen nich möglich

        public void BarPressed(Vector2 Position)
        {
            if (Position.X < makerPosition.X)
            {
                float dif   = (Position.X - makerPosition.X + makerwidth);
                float value = currentValue + (dif / PushLenght);
                if (value >= this.minValue && value <= this.maxValue)
                {
                    value        = (int)(value * this.cut);
                    currentValue = value / cut;
                    calculatingMakerPos(currentValue);
                }
                OptionList call = (OptionList)caller.caller;
                call.changed(this.caller.Name, true, true);
            }
            else if (Position.X > makerPosition.X + makerwidth)
            {
                float dif   = (Position.X - makerPosition.X + makerwidth);
                float value = currentValue + (dif / PushLenght);
                if (value >= this.minValue && value <= this.maxValue)
                {
                    value        = (int)(value * this.cut);
                    currentValue = value / cut;
                    calculatingMakerPos(currentValue);
                }
                OptionList call = (OptionList)caller.caller;
                call.changed(this.caller.Name, true, true);
            }
        }
Example #2
0
        public void MinusPressed()
        {
            float value = currentValue - stepSize;

            if (value >= this.minValue && value <= this.maxValue)
            {
                value        = (int)(value * this.cut);
                currentValue = value / cut;
                calculatingMakerPos(currentValue);
            }
            OptionList call = (OptionList)caller.caller;

            call.changed(this.caller.Name, false, false);
        }
Example #3
0
        public void Minuspressed()
        {
            if (currentNumber != 0)
            {
                currentNumber--;
                currentString = Names[currentNumber];
            }
            else
            {
                currentNumber = (Names.Count - 1);
                currentString = Names[currentNumber];
            }
            OptionList call = (OptionList)Caller.caller;

            call.changed(name, false, false);
        }
Example #4
0
        public void Pluspressed()
        {
            if (currentNumber != (Names.Count - 1))
            {
                currentNumber++;
                currentString = Names[currentNumber];
            }
            else
            {
                currentNumber = 0;
                currentString = Names[currentNumber];
            }
            OptionList call = (OptionList)Caller.caller;

            call.changed(name, true, false);
        }