diff --git a/CelesteTAS-EverestInterop/Dialog/English.txt b/CelesteTAS-EverestInterop/Dialog/English.txt index cd28235c..52100c97 100644 --- a/CelesteTAS-EverestInterop/Dialog/English.txt +++ b/CelesteTAS-EverestInterop/Dialog/English.txt @@ -102,6 +102,7 @@ TAS_CENTER_CAMERA_HORIZONTALLY_ONLY= Center Camera Horizontally Only TAS_RESTORE_SETTINGS= Restore All Settings when TAS Stop TAS_LAUNCH_STUDIO_AT_BOOT= Launch Studio at Boot TAS_ATTEMPT_TO_CONNECT_TO_STUDIO= Attempt To Connect To Studio +TAS_SHOW_STUDIO_UPDATE_BANNER= Show Studio Update Banner TAS_HIDE_FREEZE_FRAMES= Hide Freeze Frames during TAS TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_1=When a freeze frame is encountered, run it and continue to the next frame TAS_HIDE_FREEZE_FRAMES_DESCRIPTION_2=before rendering. Applies only while a TAS is active. diff --git a/CelesteTAS-EverestInterop/Source/EverestInterop/StudioUpdateBanner.cs b/CelesteTAS-EverestInterop/Source/EverestInterop/StudioUpdateBanner.cs index cd131faf..ca60d876 100644 --- a/CelesteTAS-EverestInterop/Source/EverestInterop/StudioUpdateBanner.cs +++ b/CelesteTAS-EverestInterop/Source/EverestInterop/StudioUpdateBanner.cs @@ -37,7 +37,7 @@ private static void Load() { } }); - var t = Task.Run(async () => { + Task.Run(async () => { // Wait for font / dialog to be loaded while ((Engine.Scene is GameLoader loader && !loader.dialogLoaded) || !GFX.Loaded || Dialog.Languages == null || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) { await Task.Delay(10).ConfigureAwait(false); @@ -63,7 +63,7 @@ private static void Load() { private static PixelFont Font => Dialog.Languages[Settings.EnglishLanguage].Font; private static float FontFaceSize => Dialog.Languages[Settings.EnglishLanguage].FontFaceSize; - private const int BannerY = 60; // Same as speedrun timer + private const int BannerY = 150; // Slightly under the speedrun timer private const int TextY = BannerY + 23; private const float PaddingVerySmall = 16.0f; @@ -81,7 +81,8 @@ private static void Load() { private static int dotCount; private static void Update() { - if (!loaded || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) { + if (!loaded || !TasSettings.ShowStudioUpdateBanner || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) { + bannerWidth = Calc.Approach(bannerWidth, 0.0f, BannerSpeed * Engine.RawDeltaTime); return; } @@ -114,7 +115,7 @@ private static void Update() { } private static void Render() { - if (!loaded || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) { + if (!loaded || bannerWidth <= 0.001f || !Dialog.Languages.ContainsKey(Settings.EnglishLanguage) || Font == null) { return; } diff --git a/CelesteTAS-EverestInterop/Source/Module/CelesteTasMenu.cs b/CelesteTAS-EverestInterop/Source/Module/CelesteTasMenu.cs index 5e8b355d..55529859 100644 --- a/CelesteTAS-EverestInterop/Source/Module/CelesteTasMenu.cs +++ b/CelesteTAS-EverestInterop/Source/Module/CelesteTasMenu.cs @@ -51,6 +51,8 @@ private static EaseInSubMenu CreateMoreOptionsSubMenu(TextMenu menu) { StudioHelper.LaunchStudio(); } })); + subMenu.Add(new TextMenu.OnOff("Show Studio Update Banner".ToDialogText(), TasSettings.ShowStudioUpdateBanner).Change(value => + TasSettings.ShowStudioUpdateBanner = value)); subMenu.Add(new TextMenu.OnOff("Attempt To Connect To Studio".ToDialogText(), TasSettings.AttemptConnectStudio).Change(value => { TasSettings.AttemptConnectStudio = value; CommunicationWrapper.ChangeStatus(); diff --git a/CelesteTAS-EverestInterop/Source/Module/CelesteTasSettings.cs b/CelesteTAS-EverestInterop/Source/Module/CelesteTasSettings.cs index 3db9c870..6de1ff2c 100644 --- a/CelesteTAS-EverestInterop/Source/Module/CelesteTasSettings.cs +++ b/CelesteTAS-EverestInterop/Source/Module/CelesteTasSettings.cs @@ -425,6 +425,7 @@ public bool CenterCameraHorizontallyOnly { public bool RestoreSettings { get; set; } = false; public bool LaunchStudioAtBoot { get; set; } = false; + public bool ShowStudioUpdateBanner { get; set; } = true; [YamlMember(Alias = "AttemptConnectStudio")] public bool _AttemptConnectStudio { get; set; } = true;