From 357c94ed8afebfca4b908e9152c5110b47d0ceb6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 30 Sep 2016 13:30:55 +0900 Subject: [PATCH] Add OsuGameMode. Standardise naming of classes. --- osu.Game/GameModes/GameModeWhiteBox.cs | 4 ++-- osu.Game/GameModes/Menu/ButtonSystem.cs | 6 +++--- osu.Game/GameModes/Menu/MainMenu.cs | 3 ++- .../Containers/{OsuComponent.cs => OsuContainer.cs} | 2 +- osu.Game/Graphics/Containers/OsuGameMode.cs | 7 +------ .../{OsuLargeComponent.cs => OsuLargeContainer.cs} | 2 +- osu.Game/osu.Game.csproj | 4 ++-- 7 files changed, 12 insertions(+), 16 deletions(-) rename osu.Game/Graphics/Containers/{OsuComponent.cs => OsuContainer.cs} (85%) rename osu.Game/Graphics/Containers/{OsuLargeComponent.cs => OsuLargeContainer.cs} (83%) diff --git a/osu.Game/GameModes/GameModeWhiteBox.cs b/osu.Game/GameModes/GameModeWhiteBox.cs index 8779e46a87..0b03cb1601 100644 --- a/osu.Game/GameModes/GameModeWhiteBox.cs +++ b/osu.Game/GameModes/GameModeWhiteBox.cs @@ -10,13 +10,13 @@ using osu.Framework.Graphics.Drawables; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.UserInterface; -using osu.Framework.MathUtils; +using osu.Game.Graphics.Containers; using OpenTK; using OpenTK.Graphics; namespace osu.Game.GameModes { - public class GameModeWhiteBox : GameMode + public class GameModeWhiteBox : OsuGameMode { private Button popButton; diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/GameModes/Menu/ButtonSystem.cs index 6a74b9aa75..8a4497a27f 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/GameModes/Menu/ButtonSystem.cs @@ -19,7 +19,7 @@ using OpenTK.Input; namespace osu.Game.GameModes.Menu { - public class ButtonSystem : OsuLargeComponent + public class ButtonSystem : OsuLargeContainer { public Action OnEdit; public Action OnExit; @@ -247,7 +247,7 @@ namespace osu.Game.GameModes.Menu /// /// osu! logo and its attachments (pulsing, visualiser etc.) /// - class OsuLogo : OsuComponent + class OsuLogo : OsuContainer { private Sprite logo; private Container logoBounceContainer; @@ -367,7 +367,7 @@ namespace osu.Game.GameModes.Menu /// Button designed specifically for the osu!next main menu. /// In order to correctly flow, we have to use a negative margin on the parent container (due to the parallelogram shape). /// - private class Button : OsuComponent + private class Button : OsuContainer { private Container iconText; private WedgedBox box; diff --git a/osu.Game/GameModes/Menu/MainMenu.cs b/osu.Game/GameModes/Menu/MainMenu.cs index 163a09bc17..0c7018c258 100644 --- a/osu.Game/GameModes/Menu/MainMenu.cs +++ b/osu.Game/GameModes/Menu/MainMenu.cs @@ -11,10 +11,11 @@ using osu.Game.GameModes.Direct; using osu.Game.GameModes.Edit; using osu.Game.GameModes.Multiplayer; using osu.Game.GameModes.Play; +using osu.Game.Graphics.Containers; namespace osu.Game.GameModes.Menu { - internal class MainMenu : GameMode + internal class MainMenu : OsuGameMode { public override string Name => @"Main Menu"; diff --git a/osu.Game/Graphics/Containers/OsuComponent.cs b/osu.Game/Graphics/Containers/OsuContainer.cs similarity index 85% rename from osu.Game/Graphics/Containers/OsuComponent.cs rename to osu.Game/Graphics/Containers/OsuContainer.cs index 51a1f3eb7a..9d7dbde298 100644 --- a/osu.Game/Graphics/Containers/OsuComponent.cs +++ b/osu.Game/Graphics/Containers/OsuContainer.cs @@ -5,7 +5,7 @@ using osu.Framework.Graphics.Containers; namespace osu.Game.Graphics.Containers { - class OsuComponent : AutoSizeContainer + class OsuContainer : AutoSizeContainer { public new OsuGameBase Game => base.Game as OsuGameBase; } diff --git a/osu.Game/Graphics/Containers/OsuGameMode.cs b/osu.Game/Graphics/Containers/OsuGameMode.cs index 9ac6845bb4..d59d941ae5 100644 --- a/osu.Game/Graphics/Containers/OsuGameMode.cs +++ b/osu.Game/Graphics/Containers/OsuGameMode.cs @@ -1,16 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework.GameModes; namespace osu.Game.Graphics.Containers { - class OsuGameMode : GameMode + public class OsuGameMode : GameMode { public new OsuGame Game => base.Game as OsuGame; } diff --git a/osu.Game/Graphics/Containers/OsuLargeComponent.cs b/osu.Game/Graphics/Containers/OsuLargeContainer.cs similarity index 83% rename from osu.Game/Graphics/Containers/OsuLargeComponent.cs rename to osu.Game/Graphics/Containers/OsuLargeContainer.cs index af91eb20de..df7a6ff9c2 100644 --- a/osu.Game/Graphics/Containers/OsuLargeComponent.cs +++ b/osu.Game/Graphics/Containers/OsuLargeContainer.cs @@ -5,7 +5,7 @@ using osu.Framework.Graphics.Containers; namespace osu.Game.Graphics.Containers { - public class OsuLargeComponent : LargeContainer + public class OsuLargeContainer : LargeContainer { public new OsuGameBase Game => base.Game as OsuGameBase; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index eb1cc03218..7c4d6be3a2 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -62,9 +62,9 @@ - + - +