mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
commit
8dadc2b215
@ -1 +1 @@
|
||||
Subproject commit f47b7132ca5d579e7a4c011bbfa38a7bb6c91c6a
|
||||
Subproject commit 7439250a63dd451f34dbc08ecf68a196cf8e479f
|
@ -15,6 +15,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Online.Chat.Display;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Desktop.Tests
|
||||
{
|
||||
@ -29,10 +30,17 @@ namespace osu.Desktop.Tests
|
||||
|
||||
private Scheduler scheduler = new Scheduler();
|
||||
|
||||
private APIAccess api => ((OsuGameBase)Game).API;
|
||||
private APIAccess api;
|
||||
|
||||
private ChannelDisplay channelDisplay;
|
||||
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load(game);
|
||||
|
||||
api = ((OsuGameBase)game).API;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
@ -9,9 +9,9 @@ namespace osu.Framework.VisualTests
|
||||
{
|
||||
class VisualTestGame : OsuGameBase
|
||||
{
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new TestBrowser());
|
||||
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Transformations;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
{
|
||||
@ -30,9 +31,9 @@ namespace osu.Game.GameModes
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Content.Scale *= 1 + (x_movement_amount / Size.X) * 2;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
//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;
|
||||
using osu.Game.Graphics.Background;
|
||||
|
||||
namespace osu.Game.GameModes.Backgrounds
|
||||
@ -14,9 +15,9 @@ namespace osu.Game.GameModes.Backgrounds
|
||||
this.textureName = textureName;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
Add(new Background(textureName));
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
//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;
|
||||
using osu.Game.Graphics.Background;
|
||||
|
||||
namespace osu.Game.GameModes.Backgrounds
|
||||
{
|
||||
public class BackgroundModeDefault : BackgroundMode
|
||||
{
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Background());
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes
|
||||
{
|
||||
@ -77,9 +78,9 @@ namespace osu.Game.GameModes
|
||||
Content.FadeIn(transition_time, EasingTypes.OutExpo);
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -44,9 +44,9 @@ namespace osu.Game.GameModes.Menu
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
Alpha = 0;
|
||||
|
||||
Children = new Drawable[]
|
||||
|
@ -56,9 +56,9 @@ namespace osu.Game.GameModes.Menu
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
@ -23,9 +24,9 @@ namespace osu.Game.GameModes.Menu
|
||||
|
||||
protected override BackgroundMode CreateBackground() => new BackgroundModeEmpty();
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -39,9 +40,9 @@ namespace osu.Game.GameModes.Menu
|
||||
}
|
||||
};
|
||||
|
||||
AudioSample welcome = Game.Audio.Sample.Get(@"welcome");
|
||||
AudioSample welcome = game.Audio.Sample.Get(@"welcome");
|
||||
|
||||
AudioTrack bgm = Game.Audio.Track.Get(@"circles");
|
||||
AudioTrack bgm = game.Audio.Track.Get(@"circles");
|
||||
bgm.Looping = true;
|
||||
|
||||
Scheduler.Add(delegate
|
||||
|
@ -13,6 +13,7 @@ using osu.Game.GameModes.Multiplayer;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
@ -23,11 +24,11 @@ namespace osu.Game.GameModes.Menu
|
||||
|
||||
protected override BackgroundMode CreateBackground() => new BackgroundModeDefault();
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
OsuGame osu = (OsuGame)Game;
|
||||
OsuGame osu = (OsuGame)game;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Menu
|
||||
{
|
||||
@ -82,12 +83,12 @@ namespace osu.Game.GameModes.Menu
|
||||
};
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
logo.Texture = Game.Textures.Get(@"Menu/logo");
|
||||
ripple.Texture = Game.Textures.Get(@"Menu/logo");
|
||||
logo.Texture = game.Textures.Get(@"Menu/logo");
|
||||
ripple.Texture = game.Textures.Get(@"Menu/logo");
|
||||
|
||||
ripple.ScaleTo(1.1f, 500);
|
||||
ripple.FadeOut(500);
|
||||
|
@ -10,6 +10,7 @@ using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using osu.Game.Beatmaps.Objects.Catch;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
@ -24,9 +25,6 @@ namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
//osu! mode requires all objects to be of CatchBaseHit type.
|
||||
objects = value.ConvertAll(convertForCatch);
|
||||
|
||||
if (Parent != null)
|
||||
Load();
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,9 +48,9 @@ namespace osu.Game.GameModes.Play.Catch
|
||||
return h;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
if (playfield == null)
|
||||
Add(playfield = new CatchPlayfield());
|
||||
@ -66,7 +64,7 @@ namespace osu.Game.GameModes.Play.Catch
|
||||
//render stuff!
|
||||
Sprite s = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Menu/logo"),
|
||||
Texture = game.Textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.1f),
|
||||
RelativePositionAxes = Axes.Y,
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Catch
|
||||
{
|
||||
@ -20,9 +21,9 @@ namespace osu.Game.GameModes.Play.Catch
|
||||
Origin = Anchor.BottomCentre;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
@ -21,9 +22,9 @@ namespace osu.Game.GameModes.Play
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Box()
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using osu.Game.Beatmaps.Objects.Mania;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
@ -30,9 +31,6 @@ namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
//osu! mode requires all objects to be of ManiaBaseHit type.
|
||||
objects = value.ConvertAll(convertForMania);
|
||||
|
||||
if (Parent != null)
|
||||
Load();
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,9 +54,9 @@ namespace osu.Game.GameModes.Play.Mania
|
||||
return h;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
if (playfield == null)
|
||||
Add(playfield = new ManiaPlayfield(columns));
|
||||
@ -72,7 +70,7 @@ namespace osu.Game.GameModes.Play.Mania
|
||||
//render stuff!
|
||||
Sprite s = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Menu/logo"),
|
||||
Texture = game.Textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.1f),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Mania
|
||||
{
|
||||
@ -23,9 +24,9 @@ namespace osu.Game.GameModes.Play.Mania
|
||||
Origin = Anchor.BottomCentre;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Box() { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
|
||||
|
@ -8,6 +8,8 @@ using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using OpenTK;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
@ -20,17 +22,16 @@ namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
set
|
||||
{
|
||||
Debug.Assert(objects == null);
|
||||
|
||||
//osu! mode requires all objects to be of OsuBaseHit type.
|
||||
objects = value.ConvertAll(o => (OsuBaseHit)o);
|
||||
|
||||
if (Parent != null)
|
||||
Load();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
if (playfield == null)
|
||||
Add(playfield = new OsuPlayfield());
|
||||
@ -44,7 +45,7 @@ namespace osu.Game.GameModes.Play.Osu
|
||||
//render stuff!
|
||||
Sprite s = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Menu/logo"),
|
||||
Texture = game.Textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.1f),
|
||||
Alpha = 0,
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Drawables;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Osu
|
||||
{
|
||||
@ -18,9 +19,9 @@ namespace osu.Game.GameModes.Play.Osu
|
||||
Origin = Anchor.Centre;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Box()
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Game.GameModes.Backgrounds;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
@ -19,11 +20,11 @@ namespace osu.Game.GameModes.Play
|
||||
typeof(Player)
|
||||
};
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
OsuGame osu = Game as OsuGame;
|
||||
OsuGame osu = game as OsuGame;
|
||||
|
||||
playMode = osu.PlayMode;
|
||||
playMode.ValueChanged += PlayMode_ValueChanged;
|
||||
|
@ -20,6 +20,7 @@ using osu.Game.GameModes.Play.Taiko;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using OpenTK;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
@ -31,9 +32,9 @@ namespace osu.Game.GameModes.Play
|
||||
typeof(Results)
|
||||
};
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
List<HitObject> objects = new List<HitObject>();
|
||||
|
||||
@ -54,7 +55,7 @@ namespace osu.Game.GameModes.Play
|
||||
HitObjects = objects
|
||||
};
|
||||
|
||||
OsuGame osu = Game as OsuGame;
|
||||
OsuGame osu = game as OsuGame;
|
||||
|
||||
switch (osu.PlayMode.Value)
|
||||
{
|
||||
|
@ -1,15 +1,16 @@
|
||||
//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;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
public class Playfield : Container
|
||||
{
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Masking = true;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ using osu.Game.Beatmaps.Objects;
|
||||
using osu.Game.Beatmaps.Objects.Osu;
|
||||
using osu.Game.Beatmaps.Objects.Taiko;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
@ -24,9 +25,6 @@ namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
//osu! mode requires all objects to be of TaikoBaseHit type.
|
||||
objects = value.ConvertAll(convertForTaiko);
|
||||
|
||||
if (Parent != null)
|
||||
Load();
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,9 +47,9 @@ namespace osu.Game.GameModes.Play.Taiko
|
||||
return h;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
if (playfield == null)
|
||||
Add(playfield = new TaikoPlayfield());
|
||||
@ -65,7 +63,7 @@ namespace osu.Game.GameModes.Play.Taiko
|
||||
//render stuff!
|
||||
Sprite s = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Menu/logo"),
|
||||
Texture = game.Textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.2f),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.GameModes.Play.Taiko
|
||||
{
|
||||
@ -20,15 +21,15 @@ namespace osu.Game.GameModes.Play.Taiko
|
||||
Origin = Anchor.Centre;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f });
|
||||
|
||||
Add(new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Menu/logo"),
|
||||
Texture = game.Textures.Get(@"Menu/logo"),
|
||||
Origin = Anchor.Centre,
|
||||
Scale = new Vector2(0.2f),
|
||||
RelativePositionAxes = Axes.Both,
|
||||
|
@ -8,6 +8,7 @@ using osu.Game.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Graphics.Background
|
||||
{
|
||||
@ -24,13 +25,13 @@ namespace osu.Game.Graphics.Background
|
||||
Depth = float.MinValue;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Add(BackgroundSprite = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(textureName),
|
||||
Texture = game.Textures.Get(textureName),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = Color4.DarkGray
|
||||
|
@ -2,6 +2,7 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
@ -26,9 +27,9 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected override Container Content => content;
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
|
@ -1,6 +1,7 @@
|
||||
//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;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
@ -35,15 +36,15 @@ namespace osu.Game.Graphics.Cursor
|
||||
Origin = Anchor.Centre;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"Cursor/cursor")
|
||||
Texture = game.Textures.Get(@"Cursor/cursor")
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -29,9 +30,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
IsRollingContinuous = false;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
countSpriteText.Hide();
|
||||
OriginalColour = Colour;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -58,20 +59,20 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
buttonSprite = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"KeyCounter/key-up"),
|
||||
Texture = game.Textures.Get(@"KeyCounter/key-up"),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
glowSprite = new Sprite
|
||||
{
|
||||
Texture = Game.Textures.Get(@"KeyCounter/key-glow"),
|
||||
Texture = game.Textures.Get(@"KeyCounter/key-glow"),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Alpha = 0
|
||||
|
@ -1,6 +1,7 @@
|
||||
//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;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using System;
|
||||
@ -31,9 +32,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
countSpriteText = new SpriteText
|
||||
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using System;
|
||||
@ -109,9 +110,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
);
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
removeTransforms(transformType);
|
||||
if (Count == null)
|
||||
ResetCount();
|
||||
|
@ -1,6 +1,7 @@
|
||||
//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;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -16,9 +17,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// </summary>
|
||||
public uint LeadingZeroes = 0;
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
countSpriteText.FixedWidth = true;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
//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;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using System;
|
||||
@ -30,9 +31,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
IsRollingContinuous = false;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
countSpriteText.Alpha = 0;
|
||||
Add(popOutSpriteText = new SpriteText
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
@ -52,9 +53,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
StopRolling();
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -79,6 +80,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Alpha = (i == 0) ? 1.0f : MinStarAlpha,
|
||||
Position = new Vector2((StarSize + StarSpacing) * i + (StarSize + StarSpacing) / 2, 0),
|
||||
};
|
||||
|
||||
//todo: user Container<T> once we have it.
|
||||
stars.Add(star);
|
||||
starContainer.Add(star);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Online.Chat.Display.osu.Online.Social;
|
||||
using OpenTK;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Online.Chat.Display
|
||||
{
|
||||
@ -57,9 +58,9 @@ namespace osu.Game.Online.Chat.Display
|
||||
channel.NewMessagesArrived -= newMessages;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
newMessages(channel.Messages);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.Online.Chat.Display
|
||||
@ -27,9 +28,9 @@ namespace osu.Game.Online.Chat.Display
|
||||
const float padding = 200;
|
||||
const float text_size = 20;
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
||||
|
@ -16,6 +16,7 @@ using osu.Game.Graphics.Background;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Input;
|
||||
using OpenTK.Input;
|
||||
@ -38,9 +39,9 @@ namespace osu.Game
|
||||
host.Size = new Vector2(Config.Get<int>(OsuConfig.Width), Config.Get<int>(OsuConfig.Height));
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
//attach our bindables to the audio subsystem.
|
||||
Audio.Volume.Weld(Config.GetBindable<double>(OsuConfig.VolumeGlobal));
|
||||
|
@ -1,4 +1,5 @@
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework;
|
||||
using osu.Framework.GameModes;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
@ -12,7 +13,7 @@ using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
public class OsuGameBase : Framework.Game
|
||||
public class OsuGameBase : BaseGame
|
||||
{
|
||||
internal OsuConfigManager Config = new OsuConfigManager();
|
||||
|
||||
@ -27,9 +28,9 @@ namespace osu.Game
|
||||
|
||||
public CursorContainer Cursor;
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
//this completely overrides the framework default. will need to change once we make a proper FontStore.
|
||||
Fonts = new TextureStore() { ScaleAdjust = 0.01f };
|
||||
|
@ -61,9 +61,9 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
initializeChannels();
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -16,9 +17,9 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
const float width = 300;
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Depth = float.MaxValue;
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
|
@ -51,9 +51,9 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Size = new Vector2(1, height);
|
||||
@ -106,7 +106,7 @@ namespace osu.Game.Overlays
|
||||
new ToolbarButton
|
||||
{
|
||||
Icon = FontAwesome.user,
|
||||
Text = ((OsuGame)Game).Config.Get<string>(OsuConfig.Username)
|
||||
Text = ((OsuGame)game).Config.Get<string>(OsuConfig.Username)
|
||||
},
|
||||
new ToolbarButton
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ using osu.Framework.Input;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Extensions;
|
||||
using osu.Game.GameModes.Play;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -42,9 +43,9 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
DrawableIcon.TextSize *= 1.4f;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.GameModes.Play;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -29,9 +30,9 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Drawables;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Framework;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
@ -24,9 +25,9 @@ namespace osu.Game
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
public override void Load(BaseGame game)
|
||||
{
|
||||
base.Load();
|
||||
base.Load(game);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
meterContainer = new Container {
|
||||
|
36
osu.sln
36
osu.sln
@ -22,31 +22,38 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Deploy|Any CPU = Deploy|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
@ -61,4 +68,33 @@ Global
|
||||
{65DC628F-A640-4111-AB35-3A5652BC1E17} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC}
|
||||
{69051C69-12AE-4E7D-A3E6-460D2E282312} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
Policies = $0
|
||||
$0.TextStylePolicy = $1
|
||||
$1.EolMarker = Windows
|
||||
$1.inheritsSet = VisualStudio
|
||||
$1.inheritsScope = text/plain
|
||||
$1.scope = text/x-csharp
|
||||
$0.CSharpFormattingPolicy = $2
|
||||
$2.IndentSwitchSection = True
|
||||
$2.NewLinesForBracesInProperties = True
|
||||
$2.NewLinesForBracesInAccessors = True
|
||||
$2.NewLinesForBracesInAnonymousMethods = True
|
||||
$2.NewLinesForBracesInControlBlocks = True
|
||||
$2.NewLinesForBracesInAnonymousTypes = True
|
||||
$2.NewLinesForBracesInObjectCollectionArrayInitializers = True
|
||||
$2.NewLinesForBracesInLambdaExpressionBody = True
|
||||
$2.NewLineForElse = True
|
||||
$2.NewLineForCatch = True
|
||||
$2.NewLineForFinally = True
|
||||
$2.NewLineForMembersInObjectInit = True
|
||||
$2.NewLineForMembersInAnonymousTypes = True
|
||||
$2.NewLineForClausesInQuery = True
|
||||
$2.SpacingAfterMethodDeclarationName = False
|
||||
$2.SpaceAfterMethodCallName = False
|
||||
$2.SpaceBeforeOpenSquareBracket = False
|
||||
$2.inheritsSet = Mono
|
||||
$2.inheritsScope = text/x-csharp
|
||||
$2.scope = text/x-csharp
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Loading…
Reference in New Issue
Block a user