Make sidebar buttons working.

This commit is contained in:
Huo Yaoyuan
2017-05-21 04:32:15 +08:00
parent aa409ac1a9
commit f06f8b4dcd
2 changed files with 16 additions and 6 deletions

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Settings
private readonly Box backgroundBox;
private readonly Box selectionIndicator;
private readonly Container text;
public Action Action;
public Action<SettingsSection> Action;
private SettingsSection section;
public SettingsSection Section
@ -75,6 +75,7 @@ namespace osu.Game.Overlays.Settings
{
Width = Sidebar.DEFAULT_WIDTH,
RelativeSizeAxes = Axes.Y,
Colour = OsuColour.Gray(0.6f),
Children = new[]
{
headerText = new OsuSpriteText
@ -110,7 +111,7 @@ namespace osu.Game.Overlays.Settings
protected override bool OnClick(InputState state)
{
Action?.Invoke();
Action?.Invoke(section);
backgroundBox.FlashColour(Color4.White, 400);
return true;
}