From 6c0cef894e5a75aaa079e62e778fd2cce7190250 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 2 Nov 2016 22:27:39 -0400 Subject: [PATCH] Add OsuButton with sane defaults --- osu.Game/Graphics/UserInterface/OsuButton.cs | 15 +++++++++++++++ osu.Game/Overlays/Options/GraphicsOptions.cs | 12 ++++++++++++ osu.Game/Overlays/Options/LoginOptions.cs | 3 ++- osu.Game/Overlays/Options/UpdateOptions.cs | 3 ++- osu.Game/osu.Game.csproj | 2 ++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 osu.Game/Graphics/UserInterface/OsuButton.cs create mode 100644 osu.Game/Overlays/Options/GraphicsOptions.cs diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs new file mode 100644 index 0000000000..fea9f907bc --- /dev/null +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -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); + } + } +} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/GraphicsOptions.cs b/osu.Game/Overlays/Options/GraphicsOptions.cs new file mode 100644 index 0000000000..c973564b29 --- /dev/null +++ b/osu.Game/Overlays/Options/GraphicsOptions.cs @@ -0,0 +1,12 @@ +using System; +namespace osu.Game.Overlays.Options +{ + public class GraphicsOptions : OptionsSection + { + public GraphicsOptions() + { + Header = "Graphics"; + } + } +} + diff --git a/osu.Game/Overlays/Options/LoginOptions.cs b/osu.Game/Overlays/Options/LoginOptions.cs index 3dc07cd4cd..dfbde0fc5e 100644 --- a/osu.Game/Overlays/Options/LoginOptions.cs +++ b/osu.Game/Overlays/Options/LoginOptions.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; +using osu.Game.Graphics.UserInterface; using osu.Game.Online.API; namespace osu.Game.Overlays.Options @@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Options new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, new SpriteText { Text = "Password" }, new TextBox { Height = 20, RelativeSizeAxes = Axes.X }, - new Button + new OsuButton { RelativeSizeAxes = Axes.X, Text = "Log in", diff --git a/osu.Game/Overlays/Options/UpdateOptions.cs b/osu.Game/Overlays/Options/UpdateOptions.cs index 2c12a4ad5c..0eda049854 100644 --- a/osu.Game/Overlays/Options/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/UpdateOptions.cs @@ -4,6 +4,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; using osu.Framework.Platform; +using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options { @@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Options { new SpriteText { Text = "TODO: Dropdown" }, new SpriteText { Text = "Your osu! is up to date" }, // TODO: map this to reality - new Button + new OsuButton { RelativeSizeAxes = Axes.X, Text = "Open osu! folder", diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 2f84188d0a..6d5fb2eae8 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -200,6 +200,8 @@ + +