mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
subtitles start cycling before the main menu is visible #844
This commit is contained in:
parent
95cd20fca7
commit
72b7a86294
@ -1,3 +1,4 @@
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.Files;
|
||||
using NewHorizons.Utility.OWML;
|
||||
using OWML.Common;
|
||||
@ -31,6 +32,8 @@ namespace NewHorizons.Handlers
|
||||
|
||||
private static List<(IModBehaviour mod, string filePath)> _additionalSubtitles = new();
|
||||
|
||||
private CanvasGroup _titleCanvasGroup;
|
||||
|
||||
public static void RegisterAdditionalSubtitle(IModBehaviour mod, string filePath)
|
||||
{
|
||||
_additionalSubtitles.Add((mod, filePath));
|
||||
@ -64,6 +67,8 @@ namespace NewHorizons.Handlers
|
||||
var layout = GetComponent<LayoutElement>();
|
||||
layout.minHeight = SUBTITLE_HEIGHT;
|
||||
|
||||
_titleCanvasGroup = SearchUtilities.Find("TitleCanvas").GetComponent<CanvasGroup>();
|
||||
|
||||
CheckForEOTE();
|
||||
|
||||
// We add our subtitles as a child object so that their sizing doesnt shift the layout of the main menu
|
||||
@ -137,6 +142,12 @@ namespace NewHorizons.Handlers
|
||||
return;
|
||||
}
|
||||
|
||||
// Fix subtitles start cycling before the main menu is visible #844
|
||||
if (_titleCanvasGroup.alpha < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pauseTimer > 0)
|
||||
{
|
||||
pauseTimer--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user