AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/UI/InGameUI/InGameUI_LoadState.cs
2024-11-28 16:33:00 +08:00

31 lines
913 B
C#

using AxibugEmuOnline.Client.ClientCore;
using System.Diagnostics;
namespace AxibugEmuOnline.Client
{
public class InGameUI_LoadState : ExecuteMenu
{
private InGameUI m_gameUI;
public override bool Visible => !m_gameUI.IsNetPlay;
public InGameUI_LoadState(InGameUI gameUI) : base("śÁČĄżěŐŐ", null)
{
m_gameUI = gameUI;
}
public override void OnExcute(OptionUI optionUI, ref bool cancelHide)
{
if (m_gameUI.IsNetPlay) return;
object state = m_gameUI.GetQuickState();
Stopwatch sw = Stopwatch.StartNew();
if (state != null)
{
m_gameUI.Core.LoadState(state);
sw.Stop();
App.log.Info($"{m_gameUI.RomFile.Platform}====>żěŐŐźÓÔŘşÄĘą:{sw.Elapsed.TotalMilliseconds}ms");
}
}
}
}