mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Merge pull request #3729 from UselessToucan/improve_hud_overlay_colour_setting
Set AccentColour in concrete counters
This commit is contained in:
commit
eb5cb44a60
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
@ -25,6 +26,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Current.Value = DisplayedCount = 1.0f;
|
Current.Value = DisplayedCount = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours) => AccentColour = colours.BlueLighter;
|
||||||
|
|
||||||
protected override string FormatCount(double count)
|
protected override string FormatCount(double count)
|
||||||
{
|
{
|
||||||
return $@"{count:P2}";
|
return $@"{count:P2}";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
@ -31,6 +32,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
LeadingZeroes = leading;
|
LeadingZeroes = leading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours) => AccentColour = colours.BlueLighter;
|
||||||
|
|
||||||
protected override double GetProportionalDuration(double currentValue, double newValue)
|
protected override double GetProportionalDuration(double currentValue, double newValue)
|
||||||
{
|
{
|
||||||
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
@ -17,6 +18,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Current.Value = DisplayedCount = 0;
|
Current.Value = DisplayedCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours) => AccentColour = colours.BlueLighter;
|
||||||
|
|
||||||
protected override string FormatCount(int count)
|
protected override string FormatCount(int count)
|
||||||
{
|
{
|
||||||
return $@"{count}x";
|
return $@"{count}x";
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
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)
|
public void Flash(JudgementResult result)
|
||||||
{
|
{
|
||||||
if (result.Type == HitResult.Miss)
|
if (result.Type == HitResult.Miss)
|
||||||
|
@ -9,7 +9,6 @@ using osu.Framework.Input.Events;
|
|||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
@ -89,7 +88,7 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[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 = config.GetBindable<bool>(OsuSetting.ShowInterface);
|
||||||
showHud.ValueChanged += hudVisibility => content.FadeTo(hudVisibility ? 1 : 0, duration);
|
showHud.ValueChanged += hudVisibility => content.FadeTo(hudVisibility ? 1 : 0, duration);
|
||||||
@ -104,18 +103,6 @@ namespace osu.Game.Screens.Play
|
|||||||
Text = @"The score overlay is currently disabled. You can toggle this by pressing Shift+Tab."
|
Text = @"The score overlay is currently disabled. You can toggle this by pressing Shift+Tab."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: the stuff below should probably not be in this base implementation, but in each individual class.
|
|
||||||
ComboCounter.AccentColour = colours.BlueLighter;
|
|
||||||
AccuracyCounter.AccentColour = colours.BlueLighter;
|
|
||||||
ScoreCounter.AccentColour = colours.BlueLighter;
|
|
||||||
|
|
||||||
var shd = HealthDisplay as StandardHealthDisplay;
|
|
||||||
if (shd != null)
|
|
||||||
{
|
|
||||||
shd.AccentColour = colours.BlueLighter;
|
|
||||||
shd.GlowColour = colours.BlueDarker;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user