mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 04:27:35 +09:00
Merge branch 'master' into beat-snap-divisor
This commit is contained in:
commit
4883e2fd5b
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.IO.Stores;
|
using osu.Framework.IO.Stores;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
{
|
{
|
||||||
@ -56,10 +57,22 @@ namespace osu.Game.Skinning
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var texture = GetTexture(componentName);
|
float ratio = 0.72f; // brings sizing roughly in-line with stable
|
||||||
|
|
||||||
|
var texture = GetTexture($"{componentName}@2x");
|
||||||
|
if (texture == null)
|
||||||
|
{
|
||||||
|
ratio *= 2;
|
||||||
|
GetTexture(componentName);
|
||||||
|
}
|
||||||
|
|
||||||
if (texture == null) return null;
|
if (texture == null) return null;
|
||||||
|
|
||||||
return new Sprite { Texture = texture };
|
return new Sprite
|
||||||
|
{
|
||||||
|
Texture = texture,
|
||||||
|
Scale = new Vector2(ratio),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Texture GetTexture(string componentName) => Textures.Get(componentName);
|
public override Texture GetTexture(string componentName) => Textures.Get(componentName);
|
||||||
|
@ -49,6 +49,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
drawable.RelativeSizeAxes = Axes.Both;
|
drawable.RelativeSizeAxes = Axes.Both;
|
||||||
drawable.Size = Vector2.One;
|
drawable.Size = Vector2.One;
|
||||||
|
drawable.Scale = Vector2.One;
|
||||||
drawable.FillMode = FillMode.Fit;
|
drawable.FillMode = FillMode.Fit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user