mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use better logic for setting slider bar settings
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
@ -23,14 +22,16 @@ namespace osu.Game.Overlays.Settings
|
||||
RelativeSizeAxes = Axes.X
|
||||
};
|
||||
|
||||
public float KeyboardStep;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
public bool TransferValueOnCommit
|
||||
{
|
||||
var slider = Control as U;
|
||||
if (slider != null)
|
||||
slider.KeyboardStep = KeyboardStep;
|
||||
get => ((U)Control).TransferValueOnCommit;
|
||||
set => ((U)Control).TransferValueOnCommit = value;
|
||||
}
|
||||
|
||||
public float KeyboardStep
|
||||
{
|
||||
get => ((U)Control).KeyboardStep;
|
||||
set => ((U)Control).KeyboardStep = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user