mirror of
https://github.com/ppy/osu.git
synced 2026-05-17 08:02:38 +08:00
Merge pull request #35120 from LumpBloom7/fix-toolbox-tooltip
Fix composition tool tooltip not changing text when enabled
This commit is contained in:
@@ -262,14 +262,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
.Select(t => new HitObjectCompositionToolButton(t, () => toolSelected(t)))
|
||||
.ToList();
|
||||
|
||||
foreach (var item in toolboxCollection.Items)
|
||||
{
|
||||
item.Selected.DisabledChanged += isDisabled =>
|
||||
{
|
||||
item.TooltipText = isDisabled ? "Add at least one timing point first!" : ((HitObjectCompositionToolButton)item).TooltipText;
|
||||
};
|
||||
}
|
||||
|
||||
togglesCollection.AddRange(CreateTernaryButtons().ToArray());
|
||||
|
||||
sampleBankTogglesCollection.AddRange(BlueprintContainer.SampleBankTernaryStates);
|
||||
|
||||
@@ -16,7 +16,10 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
Tool = tool;
|
||||
|
||||
TooltipText = tool.TooltipText;
|
||||
Selected.BindDisabledChanged(isDisabled =>
|
||||
{
|
||||
TooltipText = isDisabled ? "Add at least one timing point first!" : Tool.TooltipText;
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user