mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 21:27:22 +09:00
Expose HUD state via Player
This commit is contained in:
parent
a10fda2843
commit
d2d589a156
@ -11,6 +11,7 @@ using osu.Game.Rulesets.Catch.Objects.Drawables;
|
|||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(DrawableRuleset drawableRuleset)
|
private void load(DrawableRuleset drawableRuleset, HUDOverlay hud)
|
||||||
{
|
{
|
||||||
hudVisibilityMode = config.GetBindable<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode);
|
hudVisibilityMode = config.GetBindable<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode);
|
||||||
|
|
||||||
|
@ -94,6 +94,11 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public int RestartCount;
|
public int RestartCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the <see cref="HUDOverlay"/> is currently visible.
|
||||||
|
/// </summary>
|
||||||
|
public IBindable<bool> ShowingOverlayComponents = new Bindable<bool>();
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private ScoreManager scoreManager { get; set; }
|
private ScoreManager scoreManager { get; set; }
|
||||||
|
|
||||||
@ -1015,6 +1020,8 @@ namespace osu.Game.Screens.Play
|
|||||||
});
|
});
|
||||||
|
|
||||||
HUDOverlay.IsPlaying.BindTo(localUserPlaying);
|
HUDOverlay.IsPlaying.BindTo(localUserPlaying);
|
||||||
|
ShowingOverlayComponents.BindTo(HUDOverlay.ShowHud);
|
||||||
|
|
||||||
DimmableStoryboard.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
DimmableStoryboard.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||||
|
|
||||||
DimmableStoryboard.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
DimmableStoryboard.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user