mirror of
https://github.com/ppy/osu
synced 2025-01-21 05:20:50 +00:00
Move TriggerChange to LoadComplete()
This commit is contained in:
parent
379688e2f2
commit
c79603290d
@ -60,23 +60,6 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
});
|
||||
|
||||
replayLoaded.ValueChanged += replayLoadedValueChanged;
|
||||
}
|
||||
|
||||
private void replayLoadedValueChanged(bool loaded)
|
||||
{
|
||||
ReplaySettingsOverlay.ReplayLoaded = loaded;
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
ReplaySettingsOverlay.Show();
|
||||
ModDisplay.FadeIn(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
ReplaySettingsOverlay.Hide();
|
||||
ModDisplay.Delay(2000).FadeOut(200);
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
@ -109,12 +92,35 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
replayLoaded.ValueChanged += replayLoadedValueChanged;
|
||||
replayLoaded.TriggerChange();
|
||||
}
|
||||
|
||||
private void replayLoadedValueChanged(bool loaded)
|
||||
{
|
||||
ReplaySettingsOverlay.ReplayLoaded = loaded;
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
ReplaySettingsOverlay.Show();
|
||||
ModDisplay.FadeIn(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
ReplaySettingsOverlay.Hide();
|
||||
ModDisplay.Delay(2000).FadeOut(200);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void BindRulesetContainer(RulesetContainer rulesetContainer)
|
||||
{
|
||||
(rulesetContainer.KeyBindingInputManager as ICanAttachKeyCounter)?.Attach(KeyCounter);
|
||||
|
||||
replayLoaded.BindTo(rulesetContainer.HasReplayLoaded);
|
||||
replayLoaded.TriggerChange();
|
||||
|
||||
Progress.BindRulestContainer(rulesetContainer);
|
||||
}
|
||||
|
@ -105,12 +105,14 @@ namespace osu.Game.Screens.Play
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
State = Visibility.Visible;
|
||||
|
||||
replayLoaded.ValueChanged += v => AllowSeeking = v;
|
||||
replayLoaded.TriggerChange();
|
||||
}
|
||||
|
||||
public void BindRulestContainer(RulesetContainer rulesetContainer)
|
||||
{
|
||||
replayLoaded.BindTo(rulesetContainer.HasReplayLoaded);
|
||||
replayLoaded.TriggerChange();
|
||||
}
|
||||
|
||||
private bool allowSeeking;
|
||||
|
Loading…
Reference in New Issue
Block a user