mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Expose AccentColour/GlowColour from hud elements, and set from HudOverlay.
This commit is contained in:
@ -31,12 +31,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Current.Value = DisplayedCount = 1.0f;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
DisplayedCountSpriteText.Colour = colours.BlueLighter;
|
||||
}
|
||||
|
||||
protected override string FormatCount(double count)
|
||||
{
|
||||
return $@"{count:P2}";
|
||||
|
@ -10,10 +10,11 @@ using osu.Game.Graphics.Sprites;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public abstract class RollingCounter<T> : Container
|
||||
public abstract class RollingCounter<T> : Container, IHasAccentColour
|
||||
{
|
||||
/// <summary>
|
||||
/// The current value.
|
||||
@ -80,6 +81,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public Color4 AccentColour
|
||||
{
|
||||
get { return DisplayedCountSpriteText.Colour; }
|
||||
set { DisplayedCountSpriteText.Colour = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skeleton of a numeric counter which value rolls over time.
|
||||
/// </summary>
|
||||
|
@ -35,12 +35,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
LeadingZeroes = leading;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
DisplayedCountSpriteText.Colour = colours.BlueLighter;
|
||||
}
|
||||
|
||||
protected override double GetProportionalDuration(double currentValue, double newValue)
|
||||
{
|
||||
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
@ -38,12 +39,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Current.Value = Current + amount;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
DisplayedCountSpriteText.Colour = colours.BlueLighter;
|
||||
}
|
||||
|
||||
protected class TransformCount : Transform<int>
|
||||
{
|
||||
public override int CurrentValue
|
||||
|
Reference in New Issue
Block a user