mirror of https://github.com/ppy/osu
introduce tooltip to rounded button with subclass instead
This commit is contained in:
parent
ad734b1a13
commit
cc29e8c16d
|
@ -7,10 +7,12 @@
|
|||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
|
@ -150,7 +152,7 @@ private void load()
|
|||
Spacing = new Vector2(0f, 10f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
gridFromPointsButton = new RoundedButton
|
||||
gridFromPointsButton = new TooltipRoundedButton
|
||||
{
|
||||
Action = () => GridFromPointsClicked?.Invoke(),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -311,6 +313,11 @@ public OutlineTriangle(bool outlineOnly, float size)
|
|||
}
|
||||
}
|
||||
|
||||
public partial class TooltipRoundedButton : RoundedButton, IHasTooltip
|
||||
{
|
||||
public virtual LocalisableString TooltipText { get; set; }
|
||||
}
|
||||
|
||||
public enum PositionSnapGridType
|
||||
{
|
||||
Square,
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
|
@ -18,7 +17,7 @@
|
|||
|
||||
namespace osu.Game.Graphics.UserInterfaceV2
|
||||
{
|
||||
public partial class RoundedButton : OsuButton, IFilterable, IHasTooltip
|
||||
public partial class RoundedButton : OsuButton, IFilterable
|
||||
{
|
||||
protected TrianglesV2? Triangles { get; private set; }
|
||||
|
||||
|
@ -108,7 +107,5 @@ public bool MatchingFilter
|
|||
}
|
||||
|
||||
public bool FilteringActive { get; set; }
|
||||
|
||||
public virtual LocalisableString TooltipText { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue