1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 00:53:19 +08:00

Merge branch 'master' into hide-multiplayer-match-room-tab

This commit is contained in:
Dean Herbert 2019-01-17 18:02:17 +09:00 committed by GitHub
commit c1f5c0edc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 26 deletions

View File

@ -92,6 +92,12 @@ namespace osu.Game.Graphics.UserInterface
AccentColour = colours.Pink; AccentColour = colours.Pink;
} }
protected override void LoadComplete()
{
updateTooltipText(Current.Value);
base.LoadComplete();
}
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)
{ {
Nub.Glowing = true; Nub.Glowing = true;

View File

@ -24,8 +24,6 @@ namespace osu.Game.Screens.Play
{ {
private const int duration = 100; private const int duration = 100;
private readonly Container content;
public readonly KeyCounterCollection KeyCounter; public readonly KeyCounterCollection KeyCounter;
public readonly RollingCounter<int> ComboCounter; public readonly RollingCounter<int> ComboCounter;
public readonly ScoreCounter ScoreCounter; public readonly ScoreCounter ScoreCounter;
@ -37,6 +35,7 @@ namespace osu.Game.Screens.Play
public readonly PlayerSettingsOverlay PlayerSettingsOverlay; public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
private Bindable<bool> showHud; private Bindable<bool> showHud;
private readonly Container visibilityContainer;
private readonly BindableBool replayLoaded = new BindableBool(); private readonly BindableBool replayLoaded = new BindableBool();
private static bool hasShownNotificationOnce; private static bool hasShownNotificationOnce;
@ -45,12 +44,12 @@ namespace osu.Game.Screens.Play
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
Add(content = new Container
{
RelativeSizeAxes = Axes.Both,
AlwaysPresent = true, // The hud may be hidden but certain elements may need to still be updated
Children = new Drawable[] Children = new Drawable[]
{ {
visibilityContainer = new Container {
RelativeSizeAxes = Axes.Both,
AlwaysPresent = true, // The hud may be hidden but certain elements may need to still be updated
Children = new Drawable[] {
ComboCounter = CreateComboCounter(), ComboCounter = CreateComboCounter(),
ScoreCounter = CreateScoreCounter(), ScoreCounter = CreateScoreCounter(),
AccuracyCounter = CreateAccuracyCounter(), AccuracyCounter = CreateAccuracyCounter(),
@ -58,6 +57,8 @@ namespace osu.Game.Screens.Play
Progress = CreateProgress(), Progress = CreateProgress(),
ModDisplay = CreateModsContainer(), ModDisplay = CreateModsContainer(),
PlayerSettingsOverlay = CreatePlayerSettingsOverlay(), PlayerSettingsOverlay = CreatePlayerSettingsOverlay(),
}
},
new FillFlowContainer new FillFlowContainer
{ {
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
@ -71,8 +72,7 @@ namespace osu.Game.Screens.Play
HoldToQuit = CreateHoldForMenuButton(), HoldToQuit = CreateHoldForMenuButton(),
} }
} }
} };
});
BindProcessor(scoreProcessor); BindProcessor(scoreProcessor);
BindRulesetContainer(rulesetContainer); BindRulesetContainer(rulesetContainer);
@ -91,7 +91,7 @@ namespace osu.Game.Screens.Play
private void load(OsuConfigManager config, NotificationOverlay notificationOverlay) private void load(OsuConfigManager config, NotificationOverlay notificationOverlay)
{ {
showHud = config.GetBindable<bool>(OsuSetting.ShowInterface); showHud = config.GetBindable<bool>(OsuSetting.ShowInterface);
showHud.ValueChanged += hudVisibility => content.FadeTo(hudVisibility ? 1 : 0, duration); showHud.ValueChanged += hudVisibility => visibilityContainer.FadeTo(hudVisibility ? 1 : 0, duration);
showHud.TriggerChange(); showHud.TriggerChange();
if (!showHud && !hasShownNotificationOnce) if (!showHud && !hasShownNotificationOnce)