1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 06:28:35 +01:00

made sliders only react to pressing

This commit is contained in:
Ellpeck 2020-03-16 19:44:32 +01:00
parent ceaaaefb47
commit ba973c1b72

View file

@ -20,9 +20,9 @@ namespace MLEM.Ui.Elements {
base.Update(time); base.Update(time);
if (this.IsSelected) { if (this.IsSelected) {
if (this.Controls.LeftButtons.Any(b => this.Input.IsDown(b, this.Controls.GamepadIndex))) { if (this.Controls.LeftButtons.Any(b => this.Input.IsPressed(b, this.Controls.GamepadIndex))) {
this.CurrentValue -= this.StepPerScroll; this.CurrentValue -= this.StepPerScroll;
} else if (this.Controls.RightButtons.Any(b => this.Input.IsDown(b, this.Controls.GamepadIndex))) { } else if (this.Controls.RightButtons.Any(b => this.Input.IsPressed(b, this.Controls.GamepadIndex))) {
this.CurrentValue += this.StepPerScroll; this.CurrentValue += this.StepPerScroll;
} }
} }