1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Merge branch 'general-fixes' into beatmap_framework

Conflicts:
	osu-framework
This commit is contained in:
Dean Herbert 2016-09-11 02:24:15 +09:00
commit b6bbea392b
6 changed files with 16 additions and 15 deletions

View File

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

View File

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

View File

@ -279,7 +279,7 @@ namespace osu.Game.GameModes.Menu
private MenuVisualisation vis;
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()
{
@ -424,7 +424,7 @@ namespace osu.Game.GameModes.Menu
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = colour,
VectorScale = new Vector2(0, 1)
Scale = new Vector2(0, 1)
});
iconText = new AutoSizeContainer
@ -440,7 +440,7 @@ namespace osu.Game.GameModes.Menu
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = 0.7f,
Scale = new Vector2(0.7f),
};
iconText.Add(icon);
@ -588,8 +588,8 @@ namespace osu.Game.GameModes.Menu
protected override void Update()
{
HandleInput = state != ButtonState.Exploded && box.VectorScale.X >= 0.8f;
iconText.Alpha = MathHelper.Clamp((box.VectorScale.X - 0.5f) / 0.3f, 0, 1);
HandleInput = state != ButtonState.Exploded && box.Scale.X >= 0.8f;
iconText.Alpha = MathHelper.Clamp((box.Scale.X - 0.5f) / 0.3f, 0, 1);
base.Update();
}
@ -663,7 +663,7 @@ namespace osu.Game.GameModes.Menu
Quad q = base.DrawQuad;
//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.BottomRight.X -= wedge;

View File

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

View File

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

View File

@ -47,7 +47,7 @@ namespace osu.Game
//};
//API.Queue(req);
AddProcessingContainer(new RatioAdjust());
AddProcessing(new RatioAdjust());
//Add(new FontTest());
@ -64,10 +64,10 @@ namespace osu.Game
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)
{
Parent.Width = Config.Set(OsuConfig.Width, ActualSize.X).Value;