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

@ -1,9 +1,12 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Select
@ -24,6 +27,14 @@ namespace osu.Game.Screens.Select
});
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
SelectedColour = colours.Green;
DeselectedColour = SelectedColour.Opacity(0.5f);
Text = @"random";
}
protected override bool OnKeyDown(KeyDownEvent e)
{
secondaryActive = e.ShiftPressed;