Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/MyPageHomeDialogData.cs
gamer147 0d9d8acae0 feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
2026-06-05 16:57:20 -04:00

64 lines
1.4 KiB
C#

using System.Collections.Generic;
using LitJson;
namespace Wizard;
public class MyPageHomeDialogData
{
public class TransitionData
{
public string TransitionTarget { get; private set; }
public string Status { get; private set; }
public string ButtonText { get; private set; }
public TransitionData(JsonData data)
{
TransitionTarget = data["scene"].ToString();
ButtonText = Data.SystemText.Get(data["button_text_id"].ToString());
Status = data["status"].ToString();
}
}
public bool IsEnable { get; private set; }
public string DialogTitle { get; private set; }
public string FilePath { get; private set; }
public List<TransitionData> TransitionList { get; private set; }
public MyPageHomeDialogData()
{
}
public MyPageHomeDialogData(JsonData data, string key)
{
Parse(data, key);
}
private void Parse(JsonData data, string key)
{
IsEnable = false;
if (data.TryGetValue(key, out var value) && value.Count != 0)
{
IsEnable = true;
JsonData jsonData = value[0];
DialogTitle = Data.SystemText.Get(jsonData["title_text_id"].ToString());
FilePath = jsonData["image"].ToString();
TransitionList = new List<TransitionData>();
JsonData jsonData2 = jsonData["button_list"];
for (int i = 0; i < jsonData2.Count; i++)
{
TransitionList.Add(new TransitionData(jsonData2[i]));
}
}
}
public void Clear()
{
IsEnable = false;
}
}