Update to latest framework version.

This commit is contained in:
Dean Herbert
2016-09-11 02:23:26 +09:00
parent e27eb996bc
commit 4a85d8627d
7 changed files with 17 additions and 16 deletions

View File

@ -122,7 +122,7 @@ namespace osu.Game.GameModes
protected override bool OnClick(InputState state) protected override bool OnClick(InputState state)
{ {
Scale = 1.5f; Scale = new Vector2(1.5f);
ScaleTo(1, 500, EasingTypes.In); ScaleTo(1, 500, EasingTypes.In);
Activated?.Invoke(); Activated?.Invoke();

View File

@ -13,6 +13,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Drawables; using osu.Framework.Graphics.Drawables;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using OpenTK;
namespace osu.Game.GameModes namespace osu.Game.GameModes
{ {
@ -36,7 +37,7 @@ namespace osu.Game.GameModes
SpriteText text = new SpriteText() SpriteText text = new SpriteText()
{ {
Text = $@"Font testy at size {i}", Text = $@"Font testy at size {i}",
Scale = i Scale = new Vector2(i)
}; };
flow.Add(text); flow.Add(text);

View File

@ -279,7 +279,7 @@ namespace osu.Game.GameModes.Menu
private MenuVisualisation vis; private MenuVisualisation vis;
private Action clickAction; private Action clickAction;
public float SizeForFlow => logo == null ? 0 : logo.ActualSize.X * logo.Scale * logoBounceContainer.Scale * 0.8f; public float SizeForFlow => logo == null ? 0 : logo.ActualSize.X * logo.Scale.X * logoBounceContainer.Scale.X * 0.8f;
public override void Load() public override void Load()
{ {
@ -424,7 +424,7 @@ namespace osu.Game.GameModes.Menu
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Colour = colour, Colour = colour,
VectorScale = new Vector2(0, 1) Scale = new Vector2(0, 1)
}); });
iconText = new AutoSizeContainer iconText = new AutoSizeContainer
@ -440,7 +440,7 @@ namespace osu.Game.GameModes.Menu
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Scale = 0.7f, Scale = new Vector2(0.7f),
}; };
iconText.Add(icon); iconText.Add(icon);
@ -588,8 +588,8 @@ namespace osu.Game.GameModes.Menu
protected override void Update() protected override void Update()
{ {
HandleInput = state != ButtonState.Exploded && box.VectorScale.X >= 0.8f; HandleInput = state != ButtonState.Exploded && box.Scale.X >= 0.8f;
iconText.Alpha = MathHelper.Clamp((box.VectorScale.X - 0.5f) / 0.3f, 0, 1); iconText.Alpha = MathHelper.Clamp((box.Scale.X - 0.5f) / 0.3f, 0, 1);
base.Update(); base.Update();
} }
@ -663,7 +663,7 @@ namespace osu.Game.GameModes.Menu
Quad q = base.DrawQuad; Quad q = base.DrawQuad;
//Will become infinite if we don't limit its maximum size. //Will become infinite if we don't limit its maximum size.
float wedge = Math.Min(q.Width, wedgeWidth / Scale / VectorScale.X); float wedge = Math.Min(q.Width, wedgeWidth / Scale.X);
q.TopLeft.X += wedge; q.TopLeft.X += wedge;
q.BottomRight.X -= wedge; q.BottomRight.X -= wedge;

View File

@ -12,8 +12,8 @@ namespace osu.Game.Graphics.Processing
protected override void Update() protected override void Update()
{ {
base.Update(); base.Update();
Scale = Parent.ActualSize.Y / 768f; Scale = new Vector2(Parent.ActualSize.Y / 768f);
Size = new Vector2(1 / Scale); Size = new Vector2(1 / Scale.X);
} }
} }
} }

View File

@ -70,8 +70,8 @@ namespace osu.Game.Graphics.UserInterface
SizeMode = InheritMode.Y, SizeMode = InheritMode.Y,
Alpha = 0 Alpha = 0
}; };
TextContainer.Add(cursor);
TextContainer.Add(cursor);
TextContainer.Add(textFlow); TextContainer.Add(textFlow);
} }

View File

@ -46,7 +46,7 @@ namespace osu.Game
//}; //};
//API.Queue(req); //API.Queue(req);
AddProcessingContainer(new RatioAdjust()); AddProcessing(new RatioAdjust());
//Add(new FontTest()); //Add(new FontTest());
@ -62,9 +62,9 @@ namespace osu.Game
base.Dispose(isDisposing); base.Dispose(isDisposing);
} }
public override bool Invalidate(bool affectsSize = true, bool affectsPosition = true, Drawable source = null) public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{ {
if (!base.Invalidate(affectsSize, affectsPosition, source)) return false; if (!base.Invalidate(invalidation, source, shallPropagate)) return false;
if (Parent != null) if (Parent != null)
{ {