mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Bind to local bindable and combine dual bindings
This commit is contained in:
@ -231,7 +231,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
DrawableRuleset.IsPaused.BindValueChanged(_ => updateGameplayState());
|
DrawableRuleset.IsPaused.BindValueChanged(_ => updateGameplayState());
|
||||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState());
|
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState());
|
||||||
breakTracker.IsBreakTime.BindValueChanged(_ => updateGameplayState());
|
|
||||||
|
|
||||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||||
|
|
||||||
@ -262,7 +261,7 @@ namespace osu.Game.Screens.Play
|
|||||||
mod.ApplyToHealthProcessor(HealthProcessor);
|
mod.ApplyToHealthProcessor(HealthProcessor);
|
||||||
|
|
||||||
IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||||
breakTracker.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createUnderlayComponents() =>
|
private Drawable createUnderlayComponents() =>
|
||||||
@ -360,6 +359,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void onBreakTimeChanged(ValueChangedEvent<bool> isBreakTime)
|
private void onBreakTimeChanged(ValueChangedEvent<bool> isBreakTime)
|
||||||
{
|
{
|
||||||
|
updateGameplayState();
|
||||||
updatePauseOnFocusLostState();
|
updatePauseOnFocusLostState();
|
||||||
HUDOverlay.KeyCounter.IsCounting = !isBreakTime.NewValue;
|
HUDOverlay.KeyCounter.IsCounting = !isBreakTime.NewValue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user