1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 19:44:22 +08:00
Files
osu-lazer/osu.Game/Rulesets/Edit/HitObjectCompositionToolButton.cs
T
2025-09-26 09:28:04 +02:00

26 lines
789 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Screens.Edit.Components.RadioButtons;
namespace osu.Game.Rulesets.Edit
{
public class HitObjectCompositionToolButton : RadioButton
{
public CompositionTool Tool { get; }
public HitObjectCompositionToolButton(CompositionTool tool, Action? action)
: base(tool.Name, action, tool.CreateIcon)
{
Tool = tool;
Selected.BindDisabledChanged(isDisabled =>
{
TooltipText = isDisabled ? "Add at least one timing point first!" : Tool.TooltipText;
}, true);
}
}
}