1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 07:51:17 +08:00
This commit is contained in:
HoutarouOreki
2018-07-19 19:07:24 +02:00
Unverified
parent 11e0732a27
commit bcd132e87f
14 changed files with 399 additions and 82 deletions
@@ -0,0 +1,43 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers;
namespace osu.Game.Graphics.UserInterface
{
public class TooltipIconButton : OsuClickableContainer, IHasTooltip
{
private readonly SpriteIcon icon;
public FontAwesome Icon
{
get { return icon.Icon; }
set { icon.Icon = value; }
}
public TooltipIconButton()
{
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
},
icon = new SpriteIcon
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Size = new Vector2(18),
}
};
}
public string TooltipText { get; set; }
}
}