mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix subtitle with small dimensions not getting created #893
This commit is contained in:
parent
51ea50ac68
commit
bd1abecb87
1
NewHorizons/External/Configs/AddonConfig.cs
vendored
1
NewHorizons/External/Configs/AddonConfig.cs
vendored
@ -41,6 +41,7 @@ namespace NewHorizons.External.Configs
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The path to the addons subtitle for the main menu.
|
/// The path to the addons subtitle for the main menu.
|
||||||
/// Defaults to "subtitle.png".
|
/// Defaults to "subtitle.png".
|
||||||
|
/// The dimensions of the Echos of the Eye subtitle is 669 x 67, so aim for that size
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string subtitlePath = "subtitle.png";
|
public string subtitlePath = "subtitle.png";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,7 @@ namespace NewHorizons.Handlers
|
|||||||
var tex = ImageUtilities.GetTexture(mod, filepath, false);
|
var tex = ImageUtilities.GetTexture(mod, filepath, false);
|
||||||
if (tex == null) return;
|
if (tex == null) return;
|
||||||
|
|
||||||
var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, Mathf.Max(SUBTITLE_HEIGHT, tex.height)), new Vector2(0.5f, 0.5f), 100.0f);
|
var sprite = Sprite.Create(tex, new Rect(0.0f, 0.0f, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100.0f);
|
||||||
AddSubtitle(sprite);
|
AddSubtitle(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user