mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Change inheritance of selection box buttons to base control instead
This commit is contained in:
@ -12,10 +12,7 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Compose.Components
|
namespace osu.Game.Screens.Edit.Compose.Components
|
||||||
{
|
{
|
||||||
/// <summary>
|
public sealed class SelectionBoxButton : SelectionBoxControl, IHasTooltip
|
||||||
/// A drag "handle" which shares the visual appearance but behaves more like a clickable button.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class SelectionBoxDragHandleButton : SelectionBoxDragHandle, IHasTooltip
|
|
||||||
{
|
{
|
||||||
private SpriteIcon icon;
|
private SpriteIcon icon;
|
||||||
|
|
||||||
@ -23,7 +20,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
public Action Action;
|
public Action Action;
|
||||||
|
|
||||||
public SelectionBoxDragHandleButton(IconUsage iconUsage, string tooltip)
|
public SelectionBoxButton(IconUsage iconUsage, string tooltip)
|
||||||
{
|
{
|
||||||
this.iconUsage = iconUsage;
|
this.iconUsage = iconUsage;
|
||||||
|
|
||||||
@ -36,7 +33,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Size *= 2;
|
Size = new Vector2(20);
|
||||||
AddInternal(icon = new SpriteIcon
|
AddInternal(icon = new SpriteIcon
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -49,9 +46,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
OperationStarted?.Invoke();
|
OnOperationStarted();
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
OperationEnded?.Invoke();
|
OnOperationEnded();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user