Revert "Fix subtitles textures being destroyed"

This reverts commit e2ea7221d27c98868482be4be84c2589f5d11399.
This commit is contained in:
Damián Garro 2022-05-27 02:45:14 -03:00
parent e2ea7221d2
commit 90a7c8b2e8

View File

@ -63,9 +63,10 @@ namespace NewHorizons.Handlers
{
Logger.Log($"Adding subtitle for {mod.ModHelper.Manifest.Name}");
var tex = mod.ModHelper.Assets.GetTexture(filepath);
var tex = ImageUtilities.GetTexture(mod, filepath);
if (tex == null) return;
// var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f);
var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, SUBTITLE_HEIGHT), new Vector2(0.5f, 0.5f), 100.0f);
AddSubtitle(sprite);
}