1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 12:30:17 +08:00

Temporary rollback of framework / SDL3

This commit is contained in:
Dean Herbert
2024-05-21 14:34:53 +08:00
Unverified
parent e740b8bcc3
commit d7d569cf4e
44 changed files with 304 additions and 226 deletions
@@ -7,8 +7,6 @@ using System;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
@@ -55,8 +53,6 @@ namespace osu.Game.Graphics.UserInterface
}
}
private Sample selectSample = null!;
public PageTabItem(T value)
: base(value)
{
@@ -82,18 +78,12 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
},
new HoverSounds(HoverSampleSet.TabSelect)
new HoverClickSounds(HoverSampleSet.TabSelect)
};
Active.BindValueChanged(active => Text.Font = Text.Font.With(Typeface.Torus, weight: active.NewValue ? FontWeight.Bold : FontWeight.Medium), true);
}
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
selectSample = audio.Samples.Get(@"UI/tabselect-select");
}
protected virtual LocalisableString CreateText() => (Value as Enum)?.GetLocalisableDescription() ?? Value.ToString();
protected override bool OnHover(HoverEvent e)
@@ -122,8 +112,6 @@ namespace osu.Game.Graphics.UserInterface
protected override void OnActivated() => slideActive();
protected override void OnDeactivated() => slideInactive();
protected override void OnActivatedByUser() => selectSample.Play();
}
}
}