mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
fixed the slider using the wrong left and right buttons
This commit is contained in:
parent
88ce9de00a
commit
2084f927ae
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using MLEM.Misc;
|
||||
|
@ -19,9 +20,9 @@ namespace MLEM.Ui.Elements {
|
|||
base.Update(time);
|
||||
|
||||
if (this.IsSelected) {
|
||||
if (this.Input.IsGamepadButtonDown(Buttons.DPadLeft) || this.Input.IsGamepadButtonDown(Buttons.LeftThumbstickLeft)) {
|
||||
if (this.Controls.LeftButtons.Any(b => this.Input.IsDown(b, this.Controls.GamepadIndex))) {
|
||||
this.CurrentValue -= this.StepPerScroll;
|
||||
} else if (this.Input.IsGamepadButtonDown(Buttons.DPadRight) || this.Input.IsGamepadButtonDown(Buttons.LeftThumbstickRight)) {
|
||||
} else if (this.Controls.RightButtons.Any(b => this.Input.IsDown(b, this.Controls.GamepadIndex))) {
|
||||
this.CurrentValue += this.StepPerScroll;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue