1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 05:32:56 +08:00

Inline KeyBindingRow construction

This commit is contained in:
Dean Herbert 2021-05-26 17:12:12 +09:00
parent 49b4a6ea67
commit 17334fd2e6

View File

@ -42,12 +42,6 @@ namespace osu.Game.Overlays.KeyBinding
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Right = SettingsPanel.CONTENT_MARGINS };
KeyBindingRow = new KeyBindingRow(key, bindings.Where(b => ((int)b.Action).Equals((int)key)))
{
AllowMainMouseButtons = ruleset != null,
Defaults = defaults
};
InternalChildren = new Drawable[]
{
new RestoreDefaultValueButton<bool>
@ -60,7 +54,11 @@ namespace osu.Game.Overlays.KeyBinding
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS },
Child = KeyBindingRow
Child = KeyBindingRow = new KeyBindingRow(key, bindings.Where(b => ((int)b.Action).Equals((int)key)))
{
AllowMainMouseButtons = ruleset != null,
Defaults = defaults
}
},
};
}