Replace ResourcePath with ResPath (#15308)

This commit is contained in:
Ygg01
2023-04-19 15:39:17 +02:00
committed by GitHub
parent 9513ea66e4
commit 71f358a027
124 changed files with 278 additions and 273 deletions

View File

@@ -8,27 +8,27 @@ namespace Content.Client.Resources
[PublicAPI]
public static class ResourceCacheExtensions
{
public static Texture GetTexture(this IResourceCache cache, ResourcePath path)
public static Texture GetTexture(this IResourceCache cache, ResPath path)
{
return cache.GetResource<TextureResource>(path);
}
public static Texture GetTexture(this IResourceCache cache, string path)
{
return GetTexture(cache, new ResourcePath(path));
return GetTexture(cache, new ResPath(path));
}
public static Font GetFont(this IResourceCache cache, ResourcePath path, int size)
public static Font GetFont(this IResourceCache cache, ResPath path, int size)
{
return new VectorFont(cache.GetResource<FontResource>(path), size);
}
public static Font GetFont(this IResourceCache cache, string path, int size)
{
return cache.GetFont(new ResourcePath(path), size);
return cache.GetFont(new ResPath(path), size);
}
public static Font GetFont(this IResourceCache cache, ResourcePath[] path, int size)
public static Font GetFont(this IResourceCache cache, ResPath[] path, int size)
{
var fs = new Font[path.Length];
for (var i = 0; i < path.Length; i++)
@@ -39,9 +39,9 @@ namespace Content.Client.Resources
public static Font GetFont(this IResourceCache cache, string[] path, int size)
{
var rp = new ResourcePath[path.Length];
var rp = new ResPath[path.Length];
for (var i = 0; i < path.Length; i++)
rp[i] = new ResourcePath(path[i]);
rp[i] = new ResPath(path[i]);
return cache.GetFont(rp, size);
}