SHA256
Add Version Label to Config Window
This commit is contained in:
4 files changed
+21
-5
No files matched your search
@@ -31,5 +31,6 @@
|
|||||||
"ui.render_config.random_seed": "Random Seed (Optional)",
|
"ui.render_config.random_seed": "Random Seed (Optional)",
|
||||||
"ui.render_config.validation_title": "Invalid Settings",
|
"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.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)"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"ui.render_config.random_seed": "랜덤 시드 (선택 사항)",
|
"ui.render_config.random_seed": "랜덤 시드 (선택 사항)",
|
||||||
"ui.render_config.validation_title": "설정 오류",
|
"ui.render_config.validation_title": "설정 오류",
|
||||||
"ui.render_config.validation_error": "입력값을 확인해 주세요:\n- 너비와 높이는 0보다 큰 정수여야 합니다.\n- 렌더 FPS와 영상 FPS는 0보다 커야 합니다.\n- 종료 후 대기 시간은 0 이상이어야 합니다.",
|
"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": "(만료됨)"
|
||||||
}
|
}
|
||||||
+1
-1
@@ -9,7 +9,7 @@ using MelonLoader.Utils;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Object = UnityEngine.Object;
|
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")]
|
[assembly: MelonGame("7th Beat Games", "A Dance of Fire and Ice")]
|
||||||
|
|
||||||
namespace ADOFAIRenderer;
|
namespace ADOFAIRenderer;
|
||||||
|
|||||||
@@ -448,6 +448,20 @@ internal static class RenderConfigWindow
|
|||||||
height: 48f
|
height: 48f
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 9. Version Label
|
||||||
|
var versionLabel = O5Factory.ControlText(ctx, scrollContent, 12f, noPad: true);
|
||||||
|
var versionText = $"ADOFAI Renderer v{Melon<RenderMod>.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<LayoutElement>();
|
||||||
|
versionLE.preferredHeight = 18f;
|
||||||
|
versionLE.minHeight = 18f;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
void UpdateVideoCodec(Codec codec)
|
void UpdateVideoCodec(Codec codec)
|
||||||
@@ -458,8 +472,8 @@ internal static class RenderConfigWindow
|
|||||||
|
|
||||||
private static void EnsureDefaultConfig(RenderConfig config)
|
private static void EnsureDefaultConfig(RenderConfig config)
|
||||||
{
|
{
|
||||||
if (config.RenderWidth <= 0) config.RenderWidth = Screen.width > 0 ? Screen.width : 2560;
|
if (config.RenderWidth <= 0) config.RenderWidth = 2560;
|
||||||
if (config.RenderHeight <= 0) config.RenderHeight = Screen.height > 0 ? Screen.height : 1440;
|
if (config.RenderHeight <= 0) config.RenderHeight = 1440;
|
||||||
if (config.RenderFPS <= 0) config.RenderFPS = 60.0;
|
if (config.RenderFPS <= 0) config.RenderFPS = 60.0;
|
||||||
if (config.VideoFPS <= 0) config.VideoFPS = 60.0;
|
if (config.VideoFPS <= 0) config.VideoFPS = 60.0;
|
||||||
if (config.DelayAfterEnd < 0) config.DelayAfterEnd = 15.0;
|
if (config.DelayAfterEnd < 0) config.DelayAfterEnd = 15.0;
|
||||||
|
|||||||
Reference in new issue
Block a user