Refactor drawable hierarchy to center properly

* Use FillFlowContainer.Spacing instead of manually applying margins.
* Use Update() for calculating button padding to preserve it after
  mod button expansion and adjust FooterButtonRandom to use this method
  while avoiding flickering.
* Expose mod display margin to clear it in the footer button.
This commit is contained in:
Bartłomiej Dach
2020-01-29 18:59:51 +01:00
parent ddec59ec91
commit c9dda78ded
4 changed files with 31 additions and 13 deletions

View File

@ -24,8 +24,11 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = @"rewind",
Alpha = 0
Alpha = 0,
});
// force both text sprites to always be present to avoid width flickering while they're being swapped out
SpriteText.AlwaysPresent = secondaryText.AlwaysPresent = true;
}
[BackgroundDependencyLoader]