1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-09 00:01:36 +02: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);
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;
} 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;
}
}