/// <summary> /// Initializes a new instance of the <see cref="CommandLineArgumentAttribute"/> class. /// </summary> /// <param name="name">The command line key.</param> /// <param name="seperator">Sets the key/value seperator.</param> /// <param name="repetition">Sets the repitition type for the argument's key.</param> /// <param name="order">Sets the order for this argument</param> public CommandLineArgumentAttribute(string name, ArgumentSeperator seperator, KeyRepetition repetition, [CallerLineNumber] int order = 0) { Name = name; Seperator = seperator; Repetition = repetition; Order = order; }
public ScriptAggregator(TInputHelper inputHelper, Predicate <TInputHelper> disableWhen, Func <TInputHelper, bool> next, Func <TInputHelper, bool> previous, Func <TInputHelper, bool> trigger, KeyRepetition KeyRepetition) { this.inputHelper = inputHelper; this.next = next; this.previous = previous; this.trigger = trigger; this.IsEnabled = true; this.KeyRepetition = KeyRepetition; this.disableWhen = disableWhen; }
internal Slider(SliderInfo sliderInfo, SliderDrawable sliderDrawable, Texture2D texture, Region region, ARenderStyle style) : base(texture, region, style, null) { this.sliderInfo = sliderInfo; this.sliderDrawable = sliderDrawable; this.sliderDrawable.OnFinishedMoving += (sender, args) => sliderInfo.SetPositionByPercentage(sliderDrawable.Percentage); this.sliderDrawable.OnFinishedMoving += (sender, args) => ValueChanged(); this.sliderDrawable.OnNewDestination += (sender, destination) => ValueChanging(destination); this.sliderDrawable.MoveByPercentage(sliderInfo.PositionPercent); this.keyRepetition = new KeyRepetition { KeyRepeatDuration = 0.01d, KeyRepeatStartDuration = 0.3d }; Subtract += () => InputManager.Mouse.IsWheelMovingUp() || InputManager.GamePad.IsButtonPressed(InputManager.GamePadInputKeys.Left) || InputManager.Keyboard.IsKeyPressed(InputManager.KeyboardInputKeys.Left); Add += () => InputManager.Mouse.IsWheelMovingDown() || InputManager.GamePad.IsButtonPressed(InputManager.GamePadInputKeys.Right) || InputManager.Keyboard.IsKeyPressed(InputManager.KeyboardInputKeys.Right); }