mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:43:21 +08:00
Make toggle more immediately hide/show tips
This commit is contained in:
parent
222459d921
commit
932d03a4f8
@ -242,8 +242,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (storage is OsuStorage osuStorage && osuStorage.Error != OsuStorageError.None)
|
if (storage is OsuStorage osuStorage && osuStorage.Error != OsuStorageError.None)
|
||||||
dialogOverlay?.Push(new StorageErrorDialog(osuStorage, osuStorage.Error));
|
dialogOverlay?.Push(new StorageErrorDialog(osuStorage, osuStorage.Error));
|
||||||
|
|
||||||
menuTip.ShowNextTip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
@ -359,6 +357,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
musicController.EnsurePlayingSomething();
|
musicController.EnsurePlayingSomething();
|
||||||
|
|
||||||
|
// Cycle tip on resuming
|
||||||
menuTip.ShowNextTip();
|
menuTip.ShowNextTip();
|
||||||
|
|
||||||
bottomElementsFlow
|
bottomElementsFlow
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -22,6 +23,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private LinkFlowContainer textFlow = null!;
|
private LinkFlowContainer textFlow = null!;
|
||||||
|
|
||||||
|
private Bindable<bool> showMenuTips = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
@ -56,9 +59,21 @@ namespace osu.Game.Screens.Menu
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
showMenuTips = config.GetBindable<bool>(OsuSetting.MenuTips);
|
||||||
|
showMenuTips.BindValueChanged(_ => ShowNextTip(), true);
|
||||||
|
}
|
||||||
|
|
||||||
public void ShowNextTip()
|
public void ShowNextTip()
|
||||||
{
|
{
|
||||||
if (!config.Get<bool>(OsuSetting.MenuTips)) return;
|
if (!showMenuTips.Value)
|
||||||
|
{
|
||||||
|
this.FadeOut(100, Easing.OutQuint);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static void formatRegular(SpriteText t) => t.Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular);
|
static void formatRegular(SpriteText t) => t.Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular);
|
||||||
static void formatSemiBold(SpriteText t) => t.Font = OsuFont.GetFont(size: 16, weight: FontWeight.SemiBold);
|
static void formatSemiBold(SpriteText t) => t.Font = OsuFont.GetFont(size: 16, weight: FontWeight.SemiBold);
|
||||||
|
Loading…
Reference in New Issue
Block a user