Refactor FFmpegDownloadUI

This commit is contained in:
copecone committed 2026-08-18 11:02:08 +09:00
1 parent a47cb39f17
commit d8712c971e
2 files changed
+12 -6

No files matched your search

+6 -6
View File
@@ -88,7 +88,7 @@ namespace ADOFAIRenderer.UI
private static TMP_FontAsset GetNanumSquareNeoBdFontAsset() private static TMP_FontAsset GetNanumSquareNeoBdFontAsset()
{ {
TMP_FontAsset? font = null; TMP_FontAsset? font = null;
if (RenderMod.FontBundle != null) if (RenderMod.FontBundle)
{ {
try try
{ {
@@ -118,7 +118,7 @@ namespace ADOFAIRenderer.UI
font = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF"); font = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF");
} }
if (font != null) return font; if (font) return font;
var fonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>(); var fonts = Resources.FindObjectsOfTypeAll<TMP_FontAsset>();
if (fonts.Length > 0) font = fonts[0]; if (fonts.Length > 0) font = fonts[0];
@@ -508,7 +508,7 @@ namespace ADOFAIRenderer.UI
_isDownloading = false; _isDownloading = false;
_buttonContainerObj.SetActive(true); _buttonContainerObj.SetActive(true);
var downloadBtnText = _buttonContainerObj.transform.Find("DownloadButton/DownloadText")?.GetComponent<TextMeshProUGUI>(); var downloadBtnText = _buttonContainerObj.transform.Find("DownloadButton/DownloadText")?.GetComponent<TextMeshProUGUI>();
if (downloadBtnText != null) if (downloadBtnText)
{ {
downloadBtnText.text = "재시도 (Retry)"; downloadBtnText.text = "재시도 (Retry)";
} }
@@ -530,7 +530,7 @@ namespace ADOFAIRenderer.UI
{ {
ExecuteOnMainThread(() => ExecuteOnMainThread(() =>
{ {
if (_statusText != null) if (_statusText)
{ {
_statusText.text = message; _statusText.text = message;
_statusText.color = color; _statusText.color = color;
@@ -542,11 +542,11 @@ namespace ADOFAIRenderer.UI
{ {
ExecuteOnMainThread(() => ExecuteOnMainThread(() =>
{ {
if (_fillRect != null) if (_fillRect)
{ {
_fillRect.anchorMax = new Vector2(percent, 1f); _fillRect.anchorMax = new Vector2(percent, 1f);
} }
if (_progressText != null) if (_progressText)
{ {
_progressText.text = text; _progressText.text = text;
} }
+6
View File
@@ -0,0 +1,6 @@
namespace ADOFAIRenderer.Util;
public class FileUtil
{
}