Add OsuButton with sane defaults

This commit is contained in:
Drew DeVault
2016-11-02 22:27:39 -04:00
parent 2aa85a4b18
commit 6c0cef894e
5 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,15 @@
using System;
using OpenTK.Graphics;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Graphics.UserInterface
{
public class OsuButton : Button
{
public OsuButton()
{
Height = 25;
Colour = new Color4(14, 132, 165, 255);
}
}
}

View File

@ -0,0 +1,12 @@
using System;
namespace osu.Game.Overlays.Options
{
public class GraphicsOptions : OptionsSection
{
public GraphicsOptions()
{
Header = "Graphics";
}
}
}

View File

@ -5,6 +5,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API; using osu.Game.Online.API;
namespace osu.Game.Overlays.Options namespace osu.Game.Overlays.Options
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Options
new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
new SpriteText { Text = "Password" }, new SpriteText { Text = "Password" },
new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, new TextBox { Height = 20, RelativeSizeAxes = Axes.X },
new Button new OsuButton
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Text = "Log in", Text = "Log in",

View File

@ -4,6 +4,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options namespace osu.Game.Overlays.Options
{ {
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Options
{ {
new SpriteText { Text = "TODO: Dropdown" }, new SpriteText { Text = "TODO: Dropdown" },
new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality
new Button new OsuButton
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Text = "Open osu! folder", Text = "Open osu! folder",

View File

@ -200,6 +200,8 @@
<Compile Include="Overlays\Options\GeneralOptions.cs" /> <Compile Include="Overlays\Options\GeneralOptions.cs" />
<Compile Include="Overlays\Options\LanguageOptions.cs" /> <Compile Include="Overlays\Options\LanguageOptions.cs" />
<Compile Include="Overlays\Options\UpdateOptions.cs" /> <Compile Include="Overlays\Options\UpdateOptions.cs" />
<Compile Include="Overlays\Options\GraphicsOptions.cs" />
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj"> <ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj">