1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 23:13:20 +08:00

Add and use 'Submit' select sample variant for particular components

This commit is contained in:
Jamie Taylor 2021-07-30 21:23:49 +09:00
parent be3c02ff7f
commit c1d8a7e2ad
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
10 changed files with 18 additions and 1 deletions

View File

@ -56,6 +56,7 @@ namespace osu.Game.Graphics.UserInterface
private Vector2 hoverSpacing => new Vector2(3f, 0f);
public DialogButton()
: base(HoverSampleSet.Submit)
{
RelativeSizeAxes = Axes.X;

View File

@ -10,6 +10,8 @@ namespace osu.Game.Graphics.UserInterface
[Description("default")]
Default,
[Description("submit")]
Submit,
[Description("button")]
Button,

View File

@ -31,6 +31,7 @@ namespace osu.Game.Online.Chat
protected override HoverSounds CreateHoverSounds(HoverSampleSet sampleSet) => new LinkHoverSounds(sampleSet, Parts);
public DrawableLinkCompiler(IEnumerable<Drawable> parts)
: base(HoverSampleSet.Submit)
{
Parts = parts.ToList();
}

View File

@ -50,6 +50,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
protected Action ViewBeatmap;
protected BeatmapPanel(BeatmapSetInfo setInfo)
: base(HoverSampleSet.Submit)
{
Debug.Assert(setInfo.OnlineBeatmapSetID != null);

View File

@ -14,6 +14,7 @@ using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Overlays.News
@ -28,6 +29,7 @@ namespace osu.Game.Overlays.News
private TextFlowContainer main;
public NewsCard(APINewsPost post)
: base(HoverSampleSet.Submit)
{
this.post = post;

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Profile.Sections
{
@ -17,6 +18,7 @@ namespace osu.Game.Overlays.Profile.Sections
private readonly BeatmapInfo beatmap;
protected BeatmapMetadataContainer(BeatmapInfo beatmap)
: base(HoverSampleSet.Submit)
{
this.beatmap = beatmap;

View File

@ -11,7 +11,6 @@ using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osuTK.Graphics;

View File

@ -14,6 +14,7 @@ using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Select.Options
{
@ -76,6 +77,7 @@ namespace osu.Game.Screens.Select.Options
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => box.ReceivePositionalInputAt(screenSpacePos);
public BeatmapOptionsButton()
: base(HoverSampleSet.Submit)
{
Width = width;
RelativeSizeAxes = Axes.Y;

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Users.Drawables
{
@ -71,6 +72,11 @@ namespace osu.Game.Users.Drawables
{
private LocalisableString tooltip = default_tooltip_text;
public ClickableArea()
: base(HoverSampleSet.Submit)
{
}
public override LocalisableString TooltipText
{
get => Enabled.Value ? tooltip : default;

View File

@ -31,6 +31,7 @@ namespace osu.Game.Users
protected Drawable Background { get; private set; }
protected UserPanel(User user)
: base(HoverSampleSet.Submit)
{
if (user == null)
throw new ArgumentNullException(nameof(user));