1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 01:12:56 +08:00

Merge pull request #30383 from CloneWith/feature/placeholder-hoverbk

Add hover background back to `ClickablePlaceholder`
This commit is contained in:
Dean Herbert 2024-10-22 18:17:36 +09:00 committed by GitHub
commit a35551ecd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,17 +17,19 @@ namespace osu.Game.Online.Placeholders
public ClickablePlaceholder(LocalisableString actionMessage, IconUsage icon) public ClickablePlaceholder(LocalisableString actionMessage, IconUsage icon)
{ {
OsuAnimatedButton button;
OsuTextFlowContainer textFlow; OsuTextFlowContainer textFlow;
AddArbitraryDrawable(new OsuAnimatedButton AddArbitraryDrawable(button = new OsuAnimatedButton
{ {
AutoSizeAxes = Framework.Graphics.Axes.Both, AutoSizeAxes = Framework.Graphics.Axes.Both,
Child = textFlow = new OsuTextFlowContainer(cp => cp.Font = cp.Font.With(size: TEXT_SIZE)) Action = () => Action?.Invoke()
});
button.Add(textFlow = new OsuTextFlowContainer(cp => cp.Font = cp.Font.With(size: TEXT_SIZE))
{ {
AutoSizeAxes = Framework.Graphics.Axes.Both, AutoSizeAxes = Framework.Graphics.Axes.Both,
Margin = new Framework.Graphics.MarginPadding(5) Margin = new Framework.Graphics.MarginPadding(5)
},
Action = () => Action?.Invoke()
}); });
textFlow.AddIcon(icon, i => textFlow.AddIcon(icon, i =>