mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Add ruleset tab item tooltips
This commit is contained in:
parent
3996972867
commit
c7ab9a8928
@ -10,11 +10,13 @@ using osu.Game.Rulesets;
|
|||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class OverlayRulesetTabItem : TabItem<RulesetInfo>
|
public class OverlayRulesetTabItem : TabItem<RulesetInfo>, IHasTooltip
|
||||||
{
|
{
|
||||||
private Color4 accentColour;
|
private Color4 accentColour;
|
||||||
|
|
||||||
@ -35,6 +37,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private readonly Drawable icon;
|
private readonly Drawable icon;
|
||||||
|
|
||||||
|
public LocalisableString TooltipText => Value.Name;
|
||||||
|
|
||||||
public OverlayRulesetTabItem(RulesetInfo value)
|
public OverlayRulesetTabItem(RulesetInfo value)
|
||||||
: base(value)
|
: base(value)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
// 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.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Resources.Localisation.Web;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -42,14 +45,20 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
public ProfileRulesetTabItem(RulesetInfo value)
|
public ProfileRulesetTabItem(RulesetInfo value)
|
||||||
: base(value)
|
: base(value)
|
||||||
{
|
{
|
||||||
Add(icon = new SpriteIcon
|
Add(icon = new DefaultRulesetIcon { Alpha = 0 });
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DefaultRulesetIcon : SpriteIcon, IHasTooltip
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
public LocalisableString TooltipText => UsersStrings.ShowEditDefaultPlaymodeIsDefaultTooltip;
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Alpha = 0,
|
public DefaultRulesetIcon()
|
||||||
Icon = FontAwesome.Solid.Star,
|
{
|
||||||
Size = new Vector2(12),
|
Origin = Anchor.Centre;
|
||||||
});
|
Anchor = Anchor.Centre;
|
||||||
|
Icon = FontAwesome.Solid.Star;
|
||||||
|
Size = new Vector2(12);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user