mirror of
https://github.com/ppy/osu
synced 2025-01-05 05:39:49 +00:00
Use explicit cast to OsuGame rather than in-between derived classes.
# Conflicts: # osu.Game/GameModes/Menu/MainMenu.cs
This commit is contained in:
parent
40e5a449bf
commit
5afb038025
@ -10,13 +10,12 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
{
|
||||
public class GameModeWhiteBox : OsuGameMode
|
||||
public class GameModeWhiteBox : GameMode
|
||||
{
|
||||
private Button popButton;
|
||||
|
||||
|
@ -19,7 +19,7 @@ using OpenTK.Input;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
public class ButtonSystem : OsuLargeContainer
|
||||
public class ButtonSystem : LargeContainer
|
||||
{
|
||||
public Action OnEdit;
|
||||
public Action OnExit;
|
||||
@ -272,7 +272,7 @@ namespace osu.Game.GameModes.Menu
|
||||
/// <summary>
|
||||
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
||||
/// </summary>
|
||||
class OsuLogo : OsuContainer
|
||||
class OsuLogo : AutoSizeContainer
|
||||
{
|
||||
private Sprite logo;
|
||||
private Container logoBounceContainer;
|
||||
@ -392,7 +392,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).
|
||||
/// </summary>
|
||||
private class Button : OsuContainer
|
||||
private class Button : AutoSizeContainer
|
||||
{
|
||||
private Container iconText;
|
||||
private WedgedBox box;
|
||||
|
@ -17,7 +17,7 @@ using OpenTK;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
internal class MainMenu : OsuGameMode
|
||||
internal class MainMenu : GameMode
|
||||
{
|
||||
private ButtonSystem buttons;
|
||||
public override string Name => @"Main Menu";
|
||||
@ -28,9 +28,13 @@ namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
base.Load();
|
||||
|
||||
OsuGame osu = (OsuGame)Game;
|
||||
|
||||
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
||||
welcome.Play();
|
||||
|
||||
//bgm = Game.Audio.Track.Get(@"circles");
|
||||
//bgm.Start();
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ParallaxContainer
|
||||
@ -52,7 +56,7 @@ namespace osu.Game.GameModes.Menu
|
||||
}, ButtonSystem.EXIT_DELAY);
|
||||
},
|
||||
OnSettings = delegate {
|
||||
Game.Options.PoppedOut = !Game.Options.PoppedOut;
|
||||
osu.Options.PoppedOut = !osu.Options.PoppedOut;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,11 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Graphics.Background
|
||||
{
|
||||
class Background : OsuLargeContainer
|
||||
class Background : LargeContainer
|
||||
{
|
||||
protected Sprite BackgroundSprite;
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
class OsuContainer : AutoSizeContainer
|
||||
{
|
||||
public new OsuGameBase Game => base.Game as OsuGameBase;
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.GameModes;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
public class OsuGameMode : GameMode
|
||||
{
|
||||
public new OsuGame Game => base.Game as OsuGame;
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
public class OsuLargeContainer : LargeContainer
|
||||
{
|
||||
public new OsuGameBase Game => base.Game as OsuGameBase;
|
||||
}
|
||||
}
|
@ -64,9 +64,6 @@
|
||||
<Compile Include="GameModes\Edit\SongSelectEdit.cs" />
|
||||
<Compile Include="Graphics\Background\Background.cs" />
|
||||
<Compile Include="Graphics\Containers\ParallaxContainer.cs" />
|
||||
<Compile Include="Graphics\Containers\OsuContainer.cs" />
|
||||
<Compile Include="Graphics\Containers\OsuGameMode.cs" />
|
||||
<Compile Include="Graphics\Containers\OsuLargeContainer.cs" />
|
||||
<Compile Include="Graphics\Cursor\OsuCursorContainer.cs" />
|
||||
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
||||
<Compile Include="Graphics\TextAwesome.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user