diff --git a/Localization/Locale/en.json b/Localization/Locale/en.json index fc2b0de..089dda0 100644 --- a/Localization/Locale/en.json +++ b/Localization/Locale/en.json @@ -31,5 +31,6 @@ "ui.render_config.random_seed": "Random Seed (Optional)", "ui.render_config.validation_title": "Invalid Settings", "ui.render_config.validation_error": "Please check your input values:\n- Width and Height must be integers > 0\n- Render FPS and Video FPS must be > 0\n- Delay After End must be >= 0", - "ui.render_config.invalid_path": "Output directory path is invalid:\n{0}" + "ui.render_config.invalid_path": "Output directory path is invalid:\n{0}", + "ui.render_config.expired": "(Expired)" } diff --git a/Localization/Locale/ko.json b/Localization/Locale/ko.json index 204c9d7..4bfcb93 100644 --- a/Localization/Locale/ko.json +++ b/Localization/Locale/ko.json @@ -31,5 +31,6 @@ "ui.render_config.random_seed": "랜덤 시드 (선택 사항)", "ui.render_config.validation_title": "설정 오류", "ui.render_config.validation_error": "입력값을 확인해 주세요:\n- 너비와 높이는 0보다 큰 정수여야 합니다.\n- 렌더 FPS와 영상 FPS는 0보다 커야 합니다.\n- 종료 후 대기 시간은 0 이상이어야 합니다.", - "ui.render_config.invalid_path": "출력 디렉토리 경로가 올바르지 않습니다:\n{0}" + "ui.render_config.invalid_path": "출력 디렉토리 경로가 올바르지 않습니다:\n{0}", + "ui.render_config.expired": "(만료됨)" } diff --git a/RenderMod.cs b/RenderMod.cs index ac540e4..29ef700 100644 --- a/RenderMod.cs +++ b/RenderMod.cs @@ -9,7 +9,7 @@ using MelonLoader.Utils; using UnityEngine; using Object = UnityEngine.Object; -[assembly: MelonInfo(typeof(RenderMod), "ADOFAI Renderer", "0.2.0-INDEV", "ADOFAI Editor Forum")] +[assembly: MelonInfo(typeof(RenderMod), "ADOFAI Renderer", "0.2.1-INDEV", "ADOFAI Editor Forum")] [assembly: MelonGame("7th Beat Games", "A Dance of Fire and Ice")] namespace ADOFAIRenderer; diff --git a/UI/Window/RenderConfigWindow.cs b/UI/Window/RenderConfigWindow.cs index 50f92fd..9226b0e 100644 --- a/UI/Window/RenderConfigWindow.cs +++ b/UI/Window/RenderConfigWindow.cs @@ -448,6 +448,20 @@ internal static class RenderConfigWindow height: 48f ); + // 9. Version Label + var versionLabel = O5Factory.ControlText(ctx, scrollContent, 12f, noPad: true); + var versionText = $"ADOFAI Renderer v{Melon.Instance.Info.Version}"; + if (DateTime.UtcNow >= RenderMod.ExpirationTime) versionText += " " + LocalizationManager.Get("ui.render_config.expired"); + + versionLabel.text = versionText; + versionLabel.alignment = TMPro.TextAlignmentOptions.Center; + versionLabel.color = ctx.Theme.TextDim; + + // ReSharper disable once InconsistentNaming + var versionLE = versionLabel.gameObject.AddComponent(); + versionLE.preferredHeight = 18f; + versionLE.minHeight = 18f; + return; void UpdateVideoCodec(Codec codec) @@ -458,8 +472,8 @@ internal static class RenderConfigWindow private static void EnsureDefaultConfig(RenderConfig config) { - if (config.RenderWidth <= 0) config.RenderWidth = Screen.width > 0 ? Screen.width : 2560; - if (config.RenderHeight <= 0) config.RenderHeight = Screen.height > 0 ? Screen.height : 1440; + if (config.RenderWidth <= 0) config.RenderWidth = 2560; + if (config.RenderHeight <= 0) config.RenderHeight = 1440; if (config.RenderFPS <= 0) config.RenderFPS = 60.0; if (config.VideoFPS <= 0) config.VideoFPS = 60.0; if (config.DelayAfterEnd < 0) config.DelayAfterEnd = 15.0;