Move button definitions to their respective classes

This commit is contained in:
Dean Herbert
2019-05-08 19:03:26 +09:00
parent 0693290ad4
commit 772eb460fb
4 changed files with 46 additions and 39 deletions

View File

@ -7,6 +7,9 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Screens.Play.HUD;
using osu.Game.Rulesets.Mods;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Screens.Select
@ -34,6 +37,14 @@ namespace osu.Game.Screens.Select
modDisplay.Current = mods;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
SelectedColour = colours.Yellow;
DeselectedColour = SelectedColour.Opacity(0.5f);
Text = @"mods";
}
private class FooterModDisplay : ModDisplay
{
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Parent?.Parent?.ReceivePositionalInputAt(screenSpacePos) ?? false;