mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge branch 'master' into collection-database
This commit is contained in:
@ -103,6 +103,8 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
}
|
||||
|
||||
private bool playedPopInSound;
|
||||
|
||||
protected override void UpdateState(ValueChangedEvent<Visibility> state)
|
||||
{
|
||||
switch (state.NewValue)
|
||||
@ -110,16 +112,24 @@ namespace osu.Game.Graphics.Containers
|
||||
case Visibility.Visible:
|
||||
if (OverlayActivationMode.Value == OverlayActivation.Disabled)
|
||||
{
|
||||
// todo: visual/audible feedback that this operation could not complete.
|
||||
State.Value = Visibility.Hidden;
|
||||
return;
|
||||
}
|
||||
|
||||
samplePopIn?.Play();
|
||||
playedPopInSound = true;
|
||||
|
||||
if (BlockScreenWideMouse && DimMainContent) game?.AddBlockingOverlay(this);
|
||||
break;
|
||||
|
||||
case Visibility.Hidden:
|
||||
samplePopOut?.Play();
|
||||
if (playedPopInSound)
|
||||
{
|
||||
samplePopOut?.Play();
|
||||
playedPopInSound = false;
|
||||
}
|
||||
|
||||
if (BlockScreenWideMouse) game?.RemoveBlockingOverlay(this);
|
||||
break;
|
||||
}
|
||||
|
@ -9,16 +9,20 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public abstract class RollingCounter<T> : Container
|
||||
public abstract class RollingCounter<T> : Container, IHasCurrentValue<T>
|
||||
where T : struct, IEquatable<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The current value.
|
||||
/// </summary>
|
||||
public Bindable<T> Current = new Bindable<T>();
|
||||
private readonly BindableWithCurrent<T> current = new BindableWithCurrent<T>();
|
||||
|
||||
public Bindable<T> Current
|
||||
{
|
||||
get => current.Current;
|
||||
set => current.Current = value;
|
||||
}
|
||||
|
||||
private SpriteText displayedCountSpriteText;
|
||||
|
||||
|
Reference in New Issue
Block a user