AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/UI/RomListMenuItem.cs

34 lines
874 B
C#
Raw Normal View History

2024-09-18 15:53:58 +08:00
using AxibugEmuOnline.Client.ClientCore;
2024-08-22 15:16:58 +08:00
using AxibugEmuOnline.Client.UI;
2024-09-18 15:53:58 +08:00
using Codice.Client.Common;
using System;
2024-08-22 15:16:58 +08:00
using UnityEngine;
namespace AxibugEmuOnline.Client
{
2024-09-18 15:53:58 +08:00
public class RomListMenuItem : VirtualSubMenuItem
2024-08-22 15:16:58 +08:00
{
[SerializeField]
2024-09-18 15:53:58 +08:00
protected EnumPlatform Platform;
2024-08-22 15:16:58 +08:00
private RomLib RomLib
{
get
{
switch (Platform)
{
case EnumPlatform.NES:
return App.nesRomLib;
default:
throw new System.NotImplementedException($"δʵ<CEB4>ֵ<EFBFBD>ƽ̨ {Platform}");
}
}
}
2024-09-18 15:53:58 +08:00
protected override void GetVirtualListDatas(Action<object> datas)
2024-08-22 15:16:58 +08:00
{
2024-09-18 15:53:58 +08:00
RomLib.FetchRomCount((roms) => datas.Invoke(roms));
2024-08-22 15:16:58 +08:00
}
}
}