Bring framework and resources up-to-date.

This commit is contained in:
Dean Herbert
2016-10-01 18:40:14 +09:00
parent 7db555be5d
commit ac16bffe49
24 changed files with 90 additions and 60 deletions

View File

@ -5,14 +5,20 @@ using OpenTK;
namespace osu.Game.Graphics.Containers
{
class ParallaxContainer : LargeContainer
class ParallaxContainer : Container
{
public float ParallaxAmount = 0.02f;
public override bool Contains(Vector2 screenSpacePos) => true;
private Container content = new LargeContainer()
public ParallaxContainer()
{
RelativeSizeAxes = Axes.Both;
}
private Container content = new Container()
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre
};
@ -27,7 +33,7 @@ namespace osu.Game.Graphics.Containers
protected override bool OnMouseMove(InputState state)
{
content.Position = (state.Mouse.Position - ActualSize / 2) * ParallaxAmount;
content.Position = (state.Mouse.Position - Size / 2) * ParallaxAmount;
return base.OnMouseMove(state);
}