1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Merge pull request #322 from peppy/general-fixes

Goodbye @2x
This commit is contained in:
Thomas Müller 2017-02-06 19:13:46 +01:00 committed by GitHub
commit d50e9b0676
18 changed files with 41 additions and 34 deletions

@ -1 +1 @@
Subproject commit 6c9be31f1928436d92b8880c16bb9ffe3b550991
Subproject commit 5906ae1e16802fd4e04a6e9ceefdbd1a95de8b9e

@ -1 +1 @@
Subproject commit 7c42cf0a565ca125edcf335fabcb2ba3961d202d
Subproject commit c03414fd4e9ffd99ab5641ac9a15ee21f3976b55

View File

@ -105,7 +105,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
//sane defaults
ring.Alpha = circle.Alpha = number.Alpha = glow.Alpha = 1;
ApproachCircle.Alpha = 0;
ApproachCircle.Scale = new Vector2(2);
ApproachCircle.Scale = new Vector2(4);
explode.Alpha = 0;
}
@ -114,7 +114,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
base.UpdatePreemptState();
ApproachCircle.FadeIn(Math.Min(TIME_FADEIN * 2, TIME_PREEMPT));
ApproachCircle.ScaleTo(0.6f, TIME_PREEMPT);
ApproachCircle.ScaleTo(1.1f, TIME_PREEMPT);
}
protected override void UpdateState(ArmedState state)

View File

@ -32,7 +32,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
body = new SliderBody(s)
{
Position = s.Position,
PathWidth = s.Scale * 72,
PathWidth = s.Scale * 64,
},
bouncer1 = new SliderBouncer(s, false)
{

View File

@ -32,7 +32,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
approachCircle.Texture = textures.Get(@"Play/osu/approachcircle@2x");
approachCircle.Texture = textures.Get(@"Play/osu/approachcircle");
}
}
}

View File

@ -22,9 +22,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
public CirclePiece()
{
Size = new Vector2(144);
Size = new Vector2(128);
Masking = true;
CornerRadius = DrawSize.X / 2;
CornerRadius = Size.X / 2;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
@ -47,7 +47,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
disc.Texture = textures.Get(@"Play/osu/disc@2x");
disc.Texture = textures.Get(@"Play/osu/disc");
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)

View File

@ -11,7 +11,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{
public ExplodePiece()
{
Size = new Vector2(144);
Size = new Vector2(128);
Anchor = Anchor.Centre;
Origin = Anchor.Centre;

View File

@ -12,7 +12,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{
public FlashPiece()
{
Size = new Vector2(144);
Size = new Vector2(128);
Masking = true;
CornerRadius = Size.X / 2;

View File

@ -33,7 +33,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
layer.Texture = textures.Get(@"Play/osu/ring-glow@2x");
layer.Texture = textures.Get(@"Play/osu/ring-glow");
}
}
}

View File

@ -32,7 +32,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
number.Texture = textures.Get(@"Play/osu/number@2x");
number.Texture = textures.Get(@"Play/osu/number");
}
}
}

View File

@ -6,32 +6,35 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{
public class RingPiece : Container
{
private Sprite ring;
public RingPiece()
{
Size = new Vector2(128);
Masking = true;
CornerRadius = Size.X / 2;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
BorderThickness = 10;
BorderColour = Color4.White;
Children = new Drawable[]
{
ring = new Sprite
new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
AlwaysPresent = true,
Alpha = 0,
RelativeSizeAxes = Axes.Both
}
};
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
ring.Texture = textures.Get(@"Play/osu/ring@2x");
}
}
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
private readonly Slider slider;
private Box follow;
const float width = 140;
const float width = 128;
public SliderBall(Slider slider)
{
@ -45,7 +45,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
AutoSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
BorderThickness = 14,
BorderThickness = 10,
BorderColour = Color4.White,
Alpha = 1,
CornerRadius = width / 2,

View File

@ -89,7 +89,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
var bytes = upload.Data;
const float aa_portion = 0.02f;
const float border_portion = 0.18f;
const float border_portion = 0.128f;
const float gradient_portion = 1 - border_portion;
const float opacity_at_centre = 0.3f;

View File

@ -74,6 +74,7 @@ namespace osu.Game.Graphics.Cursor
{
shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.Texture);
texture = textures.Get(@"Cursor/cursortrail");
Scale = new Vector2(1 / texture.ScaleAdjust);
}
protected override void Update()

View File

@ -45,7 +45,7 @@ namespace osu.Game
Dependencies.Cache(new OsuColour());
//this completely overrides the framework default. will need to change once we make a proper FontStore.
Dependencies.Cache(Fonts = new FontStore { ScaleAdjust = 0.01f }, true);
Dependencies.Cache(Fonts = new FontStore { ScaleAdjust = 100 }, true);
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/osuFont"));

View File

@ -79,7 +79,7 @@ namespace osu.Game.Overlays.Toolbar
{
this.game = game;
guestTexture = textures.Get(@"Online/avatar-guest@2x");
guestTexture = textures.Get(@"Online/avatar-guest");
}
public int UserId

View File

@ -132,7 +132,6 @@ namespace osu.Game.Screens.Menu
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(0.5f),
},
}
},
@ -147,7 +146,6 @@ namespace osu.Game.Screens.Menu
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
BlendingMode = BlendingMode.Additive,
Scale = new Vector2(0.5f),
Alpha = 0.15f
}
}
@ -170,8 +168,8 @@ namespace osu.Game.Screens.Menu
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
logo.Texture = textures.Get(@"Menu/logo@2x");
ripple.Texture = textures.Get(@"Menu/logo@2x");
logo.Texture = textures.Get(@"Menu/logo");
ripple.Texture = textures.Get(@"Menu/logo");
}
protected override void LoadComplete()

View File

@ -97,7 +97,6 @@ namespace osu.Game.Screens.Select
HoverLost?.Invoke();
light.ScaleTo(new Vector2(1, 1), Footer.TRANSITION_LENGTH, EasingTypes.OutQuint);
light.FadeColour(DeselectedColour, Footer.TRANSITION_LENGTH, EasingTypes.OutQuint);
box.FadeOut(Footer.TRANSITION_LENGTH, EasingTypes.OutQuint);
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
@ -106,6 +105,12 @@ namespace osu.Game.Screens.Select
return base.OnMouseDown(state, args);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
box.FadeOut(Footer.TRANSITION_LENGTH, EasingTypes.OutQuint);
return base.OnMouseUp(state, args);
}
protected override bool OnClick(InputState state)
{
box.ClearTransformations();