From ba973c1b72168d3594b75703d7e9811f4d0c5206 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 16 Mar 2020 19:44:32 +0100 Subject: [PATCH] made sliders only react to pressing --- MLEM.Ui/Elements/Slider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MLEM.Ui/Elements/Slider.cs b/MLEM.Ui/Elements/Slider.cs index 17e20d1..8fb1f81 100644 --- a/MLEM.Ui/Elements/Slider.cs +++ b/MLEM.Ui/Elements/Slider.cs @@ -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; } }