mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 19:33:01 +08:00
Merge pull request #30383 from CloneWith/feature/placeholder-hoverbk
Add hover background back to `ClickablePlaceholder`
This commit is contained in:
commit
a35551ecd9
@ -17,19 +17,21 @@ namespace osu.Game.Online.Placeholders
|
||||
|
||||
public ClickablePlaceholder(LocalisableString actionMessage, IconUsage icon)
|
||||
{
|
||||
OsuAnimatedButton button;
|
||||
OsuTextFlowContainer textFlow;
|
||||
|
||||
AddArbitraryDrawable(new OsuAnimatedButton
|
||||
AddArbitraryDrawable(button = new OsuAnimatedButton
|
||||
{
|
||||
AutoSizeAxes = Framework.Graphics.Axes.Both,
|
||||
Child = textFlow = new OsuTextFlowContainer(cp => cp.Font = cp.Font.With(size: TEXT_SIZE))
|
||||
{
|
||||
AutoSizeAxes = Framework.Graphics.Axes.Both,
|
||||
Margin = new Framework.Graphics.MarginPadding(5)
|
||||
},
|
||||
Action = () => Action?.Invoke()
|
||||
});
|
||||
|
||||
button.Add(textFlow = new OsuTextFlowContainer(cp => cp.Font = cp.Font.With(size: TEXT_SIZE))
|
||||
{
|
||||
AutoSizeAxes = Framework.Graphics.Axes.Both,
|
||||
Margin = new Framework.Graphics.MarginPadding(5)
|
||||
});
|
||||
|
||||
textFlow.AddIcon(icon, i =>
|
||||
{
|
||||
i.Padding = new Framework.Graphics.MarginPadding { Right = 10 };
|
||||
|
Loading…
Reference in New Issue
Block a user