Migrate to C#12

This commit is contained in:
copecone committed 2026-10-22 11:54:26 +09:00
1 parent 7eaf4f48e6
commit 98d31404cc
24 files changed
+42 -42

No files matched your search

+1
View File
@@ -222,6 +222,7 @@ internal class CommonWarningDialogUI : MonoBehaviour
var btnRowObj = new GameObject("ButtonRow");
btnRowObj.transform.SetParent(content, false);
var btnRowRect = btnRowObj.AddComponent<RectTransform>();
// ReSharper disable once InconsistentNaming
var btnRowLE = btnRowObj.AddComponent<LayoutElement>();
btnRowLE.preferredHeight = 40f;
btnRowLE.flexibleWidth = 1f;
+6
View File
@@ -228,6 +228,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
descText.lineSpacing = 5;
descText.color = new Color(0.85f, 0.85f, 0.85f, 1f);
// ReSharper disable once InconsistentNaming
var descLE = descText.gameObject.AddComponent<LayoutElement>();
descLE.flexibleWidth = 1f;
descLE.flexibleHeight = 1f;
@@ -237,6 +238,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
_buttonContainerObj.transform.SetParent(content, false);
_buttonContainerObj.layer = 5;
// ReSharper disable once InconsistentNaming
var btnContainerLE = _buttonContainerObj.AddComponent<LayoutElement>();
btnContainerLE.preferredHeight = 40f;
btnContainerLE.flexibleWidth = 1f;
@@ -265,6 +267,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
downloadBtn.NormalColor = ctx.Theme.ObjectActiveBright;
downloadBtn.UpdateVisual();
// ReSharper disable once InconsistentNaming
var downloadBtnLE = downloadBtn.Rect.gameObject.AddComponent<LayoutElement>();
downloadBtnLE.flexibleWidth = 1f;
downloadBtnLE.preferredHeight = 40f;
@@ -277,6 +280,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
id: "btn_ffmpeg_cancel",
height: 40f
);
// ReSharper disable once InconsistentNaming
var cancelBtnLE = cancelBtn.Rect.gameObject.AddComponent<LayoutElement>();
cancelBtnLE.flexibleWidth = 1f;
cancelBtnLE.preferredHeight = 40f;
@@ -288,6 +292,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
_progressBarObj.layer = 5;
_progressBarObj.SetActive(false);
// ReSharper disable once InconsistentNaming
var pbLE = _progressBarObj.AddComponent<LayoutElement>();
pbLE.preferredHeight = 24f;
pbLE.flexibleWidth = 1f;
@@ -355,6 +360,7 @@ internal class FFmpegDownloadUI : MonoBehaviour
_statusTextObj.layer = 5;
_statusTextObj.SetActive(false);
// ReSharper disable once InconsistentNaming
var statusLE = _statusTextObj.AddComponent<LayoutElement>();
statusLE.preferredHeight = 22f;
statusLE.flexibleWidth = 1f;
+3 -2
View File
@@ -183,6 +183,7 @@ internal class SegmentedControl<T> : O5Object
segmentObj.transform.SetParent(maskRect, false);
var segRect = segmentObj.AddComponent<RectTransform>();
// ReSharper disable once InconsistentNaming
var segLE = segmentObj.AddComponent<LayoutElement>();
segLE.minWidth = 0f;
segLE.preferredWidth = 0f;
@@ -323,7 +324,7 @@ internal class SegmentedControl<T> : O5Object
if (EqualityComparer<T>.Default.Equals(_value, newValue)) return;
_value = newValue;
UpdateVisual(false);
UpdateVisual();
if (notify)
{
@@ -337,7 +338,7 @@ internal class SegmentedControl<T> : O5Object
if (EqualityComparer<T>.Default.Equals(_value, value)) return;
_value = value;
UpdateVisual(false);
UpdateVisual();
if (notify)
{