mirror of
https://github.com/osukey/osukey.git
synced 2025-05-22 14:07:38 +09:00
FadeIn/Out
This commit is contained in:
parent
e1d3befaed
commit
c1b48c6cbf
@ -19,6 +19,9 @@ namespace osu.Game.Modes.UI
|
|||||||
{
|
{
|
||||||
public abstract class HudOverlay : Container
|
public abstract class HudOverlay : Container
|
||||||
{
|
{
|
||||||
|
private const int duration = 100;
|
||||||
|
|
||||||
|
private readonly Container hud;
|
||||||
public readonly KeyCounterCollection KeyCounter;
|
public readonly KeyCounterCollection KeyCounter;
|
||||||
public readonly ComboCounter ComboCounter;
|
public readonly ComboCounter ComboCounter;
|
||||||
public readonly ScoreCounter ScoreCounter;
|
public readonly ScoreCounter ScoreCounter;
|
||||||
@ -28,8 +31,6 @@ namespace osu.Game.Modes.UI
|
|||||||
private Bindable<bool> showKeyCounter;
|
private Bindable<bool> showKeyCounter;
|
||||||
private Bindable<bool> showHud;
|
private Bindable<bool> showHud;
|
||||||
|
|
||||||
private readonly Container hud;
|
|
||||||
|
|
||||||
private static bool has_shown_notification_once = false;
|
private static bool has_shown_notification_once = false;
|
||||||
|
|
||||||
protected abstract KeyCounterCollection CreateKeyCounter();
|
protected abstract KeyCounterCollection CreateKeyCounter();
|
||||||
@ -90,9 +91,9 @@ namespace osu.Game.Modes.UI
|
|||||||
private void hudVisibilityChanged(object sender, EventArgs e)
|
private void hudVisibilityChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (showHud)
|
if (showHud)
|
||||||
hud.Show();
|
hud.FadeIn(duration);
|
||||||
else
|
else
|
||||||
hud.Hide();
|
hud.FadeOut(duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindProcessor(ScoreProcessor processor)
|
public void BindProcessor(ScoreProcessor processor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user