mirror of
https://github.com/ppy/osu
synced 2025-02-02 03:11:58 +00:00
Set AccentColour and GlowColour in StandardHealthDisplay
This commit is contained in:
parent
37b19f78ae
commit
ecf8a89f26
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -92,6 +93,13 @@ namespace osu.Game.Screens.Play.HUD
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AccentColour = colours.BlueLighter;
|
||||
GlowColour = colours.BlueDarker;
|
||||
}
|
||||
|
||||
public void Flash(JudgementResult result)
|
||||
{
|
||||
if (result.Type == HitResult.Miss)
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Input.Events;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
@ -89,7 +88,7 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuConfigManager config, NotificationOverlay notificationOverlay, OsuColour colours)
|
||||
private void load(OsuConfigManager config, NotificationOverlay notificationOverlay)
|
||||
{
|
||||
showHud = config.GetBindable<bool>(OsuSetting.ShowInterface);
|
||||
showHud.ValueChanged += hudVisibility => content.FadeTo(hudVisibility ? 1 : 0, duration);
|
||||
@ -104,13 +103,6 @@ namespace osu.Game.Screens.Play
|
||||
Text = @"The score overlay is currently disabled. You can toggle this by pressing Shift+Tab."
|
||||
});
|
||||
}
|
||||
|
||||
var shd = HealthDisplay as StandardHealthDisplay;
|
||||
if (shd != null)
|
||||
{
|
||||
shd.AccentColour = colours.BlueLighter;
|
||||
shd.GlowColour = colours.BlueDarker;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user