Fix incorrect ratios being applied to playfield / skin elements

This now matches osu-stable 1:1.
This commit is contained in:
Dean Herbert 2019-07-19 11:45:33 +09:00
parent efad9b3150
commit 9473f6d3e3
3 changed files with 15 additions and 5 deletions

View File

@ -101,11 +101,10 @@ private void load(OsuConfigManager config, IBindable<WorkingBeatmap> beatmap)
},
},
}
})
}, confineMode: ConfineMode.NoScaling)
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
}
};

View File

@ -18,7 +18,7 @@ public OsuPlayfieldAdjustmentContainer()
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
Size = new Vector2(0.75f);
Size = new Vector2(0.8f);
InternalChild = new Container
{

View File

@ -95,7 +95,6 @@ public override Drawable GetDrawableComponent(string componentName)
public override Texture GetTexture(string componentName)
{
float ratio = 2;
var texture = Textures.Get($"{componentName}@2x");
if (texture == null)
@ -105,7 +104,19 @@ public override Texture GetTexture(string componentName)
}
if (texture != null)
texture.ScaleAdjust = ratio / 0.72f; // brings sizing roughly in-line with stable
{
texture.ScaleAdjust = ratio;
switch (componentName)
{
case "cursormiddle":
case "cursortrail":
case "cursor":
// apply inverse of adjustment in OsuPlayfieldAdjustmentContainer for non-gameplay-scale textures.
texture.ScaleAdjust *= 1.6f;
break;
}
}
return texture;
}