mirror of
https://github.com/osukey/osukey.git
synced 2025-06-21 19:27:58 +09:00
Move logic to LoadComplete instead
This commit is contained in:
parent
63e6ec1c9f
commit
c12c09ec4d
@ -28,8 +28,6 @@ namespace osu.Game.Overlays.OSD
|
|||||||
private SampleChannel sampleOff;
|
private SampleChannel sampleOff;
|
||||||
private SampleChannel sampleChange;
|
private SampleChannel sampleChange;
|
||||||
|
|
||||||
private bool playedSample;
|
|
||||||
|
|
||||||
public TrackedSettingToast(SettingDescription description)
|
public TrackedSettingToast(SettingDescription description)
|
||||||
: base(description.Name, description.Value, description.Shortcut)
|
: base(description.Name, description.Value, description.Shortcut)
|
||||||
{
|
{
|
||||||
@ -77,11 +75,9 @@ namespace osu.Game.Overlays.OSD
|
|||||||
optionLights.Add(new OptionLight { Glowing = i == selectedOption });
|
optionLights.Add(new OptionLight { Glowing = i == selectedOption });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (playedSample) return;
|
|
||||||
|
|
||||||
if (optionCount == 1)
|
if (optionCount == 1)
|
||||||
{
|
{
|
||||||
@ -97,8 +93,6 @@ namespace osu.Game.Overlays.OSD
|
|||||||
sampleChange.Frequency.Value = 1 + (double)selectedOption / (optionCount - 1) * 0.25f;
|
sampleChange.Frequency.Value = 1 + (double)selectedOption / (optionCount - 1) * 0.25f;
|
||||||
sampleChange.Play();
|
sampleChange.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
playedSample = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user