mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Use explicit cast to OsuGame rather than in-between derived classes.
# Conflicts: # osu.Game/GameModes/Menu/MainMenu.cs
This commit is contained in:
@ -10,13 +10,12 @@ using osu.Framework.Graphics.Drawables;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Transformations;
|
using osu.Framework.Graphics.Transformations;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.Containers;
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.GameModes
|
namespace osu.Game.GameModes
|
||||||
{
|
{
|
||||||
public class GameModeWhiteBox : OsuGameMode
|
public class GameModeWhiteBox : GameMode
|
||||||
{
|
{
|
||||||
private Button popButton;
|
private Button popButton;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ using OpenTK.Input;
|
|||||||
|
|
||||||
namespace osu.Game.GameModes.Menu
|
namespace osu.Game.GameModes.Menu
|
||||||
{
|
{
|
||||||
public class ButtonSystem : OsuLargeContainer
|
public class ButtonSystem : LargeContainer
|
||||||
{
|
{
|
||||||
public Action OnEdit;
|
public Action OnEdit;
|
||||||
public Action OnExit;
|
public Action OnExit;
|
||||||
@ -272,7 +272,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class OsuLogo : OsuContainer
|
class OsuLogo : AutoSizeContainer
|
||||||
{
|
{
|
||||||
private Sprite logo;
|
private Sprite logo;
|
||||||
private Container logoBounceContainer;
|
private Container logoBounceContainer;
|
||||||
@ -392,7 +392,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
/// Button designed specifically for the osu!next main 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).
|
/// In order to correctly flow, we have to use a negative margin on the parent container (due to the parallelogram shape).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private class Button : OsuContainer
|
private class Button : AutoSizeContainer
|
||||||
{
|
{
|
||||||
private Container iconText;
|
private Container iconText;
|
||||||
private WedgedBox box;
|
private WedgedBox box;
|
||||||
|
@ -17,7 +17,7 @@ using OpenTK;
|
|||||||
|
|
||||||
namespace osu.Game.GameModes.Menu
|
namespace osu.Game.GameModes.Menu
|
||||||
{
|
{
|
||||||
internal class MainMenu : OsuGameMode
|
internal class MainMenu : GameMode
|
||||||
{
|
{
|
||||||
private ButtonSystem buttons;
|
private ButtonSystem buttons;
|
||||||
public override string Name => @"Main Menu";
|
public override string Name => @"Main Menu";
|
||||||
@ -28,9 +28,13 @@ namespace osu.Game.GameModes.Menu
|
|||||||
{
|
{
|
||||||
base.Load();
|
base.Load();
|
||||||
|
|
||||||
|
OsuGame osu = (OsuGame)Game;
|
||||||
|
|
||||||
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
||||||
welcome.Play();
|
welcome.Play();
|
||||||
|
|
||||||
|
//bgm = Game.Audio.Track.Get(@"circles");
|
||||||
|
//bgm.Start();
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ParallaxContainer
|
new ParallaxContainer
|
||||||
@ -52,7 +56,7 @@ namespace osu.Game.GameModes.Menu
|
|||||||
}, ButtonSystem.EXIT_DELAY);
|
}, ButtonSystem.EXIT_DELAY);
|
||||||
},
|
},
|
||||||
OnSettings = delegate {
|
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 osu.Game.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Background
|
namespace osu.Game.Graphics.Background
|
||||||
{
|
{
|
||||||
class Background : OsuLargeContainer
|
class Background : LargeContainer
|
||||||
{
|
{
|
||||||
protected Sprite BackgroundSprite;
|
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="GameModes\Edit\SongSelectEdit.cs" />
|
||||||
<Compile Include="Graphics\Background\Background.cs" />
|
<Compile Include="Graphics\Background\Background.cs" />
|
||||||
<Compile Include="Graphics\Containers\ParallaxContainer.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\Cursor\OsuCursorContainer.cs" />
|
||||||
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
<Compile Include="Graphics\Processing\RatioAdjust.cs" />
|
||||||
<Compile Include="Graphics\TextAwesome.cs" />
|
<Compile Include="Graphics\TextAwesome.cs" />
|
||||||
|
Reference in New Issue
Block a user