mirror of
https://github.com/ppy/osu.git
synced 2026-05-25 07:50:02 +08:00
Add build-scoped requests;
Add OnClick to TooltipIconButton; Actions on pressing previous/next in builds
This commit is contained in:
@@ -5,13 +5,16 @@ using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class TooltipIconButton : OsuClickableContainer, IHasTooltip
|
||||
{
|
||||
private readonly SpriteIcon icon;
|
||||
public Action OnPressed;
|
||||
|
||||
public FontAwesome Icon
|
||||
{
|
||||
@@ -37,6 +40,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
OnPressed?.Invoke();
|
||||
return base.OnClick(state);
|
||||
}
|
||||
|
||||
public string TooltipText { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user