mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Simplify inward bindings
This commit is contained in:
@ -118,9 +118,10 @@ namespace osu.Game.Screens.Play
|
|||||||
OnQuit = performUserRequestedExit,
|
OnQuit = performUserRequestedExit,
|
||||||
Start = gameplayClockContainer.Start,
|
Start = gameplayClockContainer.Start,
|
||||||
Stop = gameplayClockContainer.Stop,
|
Stop = gameplayClockContainer.Stop,
|
||||||
|
IsPaused = { BindTarget = gameplayClockContainer.IsPaused },
|
||||||
|
|
||||||
CheckCanPause = () => AllowPause && ValidForResume && !HasFailed && !RulesetContainer.HasReplayLoaded.Value,
|
CheckCanPause = () => AllowPause && ValidForResume && !HasFailed && !RulesetContainer.HasReplayLoaded.Value,
|
||||||
Children = new Container[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
StoryboardContainer = CreateStoryboardContainer(),
|
StoryboardContainer = CreateStoryboardContainer(),
|
||||||
new ScalingContainer(ScalingMode.Gameplay)
|
new ScalingContainer(ScalingMode.Gameplay)
|
||||||
@ -137,12 +138,12 @@ namespace osu.Game.Screens.Play
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Breaks = working.Beatmap.Breaks
|
Breaks = working.Beatmap.Breaks
|
||||||
},
|
},
|
||||||
new ScalingContainer(ScalingMode.Gameplay)
|
RulesetContainer.Cursor?.CreateProxy() ?? new Container(),
|
||||||
{
|
|
||||||
Child = RulesetContainer.Cursor?.CreateProxy() ?? new Container(),
|
|
||||||
},
|
|
||||||
HUDOverlay = new HUDOverlay(ScoreProcessor, RulesetContainer, working)
|
HUDOverlay = new HUDOverlay(ScoreProcessor, RulesetContainer, working)
|
||||||
{
|
{
|
||||||
|
HoldToQuit = { Action = performUserRequestedExit },
|
||||||
|
PlayerSettingsOverlay = { PlaybackSettings = { UserPlaybackRate = { BindTarget = gameplayClockContainer.UserPlaybackRate } } },
|
||||||
|
KeyCounter = { Visible = { BindTarget = RulesetContainer.HasReplayLoaded } },
|
||||||
RequestSeek = gameplayClockContainer.Seek,
|
RequestSeek = gameplayClockContainer.Seek,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre
|
Origin = Anchor.Centre
|
||||||
@ -171,12 +172,7 @@ namespace osu.Game.Screens.Play
|
|||||||
};
|
};
|
||||||
|
|
||||||
// bind clock into components that require it
|
// bind clock into components that require it
|
||||||
PausableGameplayContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
|
||||||
RulesetContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
RulesetContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
||||||
HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.BindTo(gameplayClockContainer.UserPlaybackRate);
|
|
||||||
|
|
||||||
HUDOverlay.HoldToQuit.Action = performUserRequestedExit;
|
|
||||||
HUDOverlay.KeyCounter.Visible.BindTo(RulesetContainer.HasReplayLoaded);
|
|
||||||
|
|
||||||
if (ShowStoryboard.Value)
|
if (ShowStoryboard.Value)
|
||||||
initializeStoryboard(false);
|
initializeStoryboard(false);
|
||||||
|
Reference in New Issue
Block a user