1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 03:22:54 +08:00

Fix toolbar not completing enough of layout to propagate hotkeys to buttons before initial display

This commit is contained in:
Dean Herbert 2021-02-25 14:52:51 +09:00
parent a08a3d44c7
commit 2c8e62ae35

View File

@ -37,6 +37,15 @@ namespace osu.Game.Overlays.Toolbar
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Size = new Vector2(1, HEIGHT); Size = new Vector2(1, HEIGHT);
AlwaysPresent = true;
}
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
// this only needed to be set for the initial LoadComplete/Update, so layout completes and gets buttons in a state they can correctly handle keyboard input for hotkeys.
AlwaysPresent = false;
} }
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]