2024-12-27 16:40:33 +08:00
|
|
|
|
using AxibugEmuOnline.Client.ClientCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace AxibugEmuOnline.Client
|
|
|
|
|
{
|
|
|
|
|
public class ScreenScalerListMenuItem : VirtualSubMenuItem
|
|
|
|
|
{
|
|
|
|
|
public override bool OnEnterItem()
|
|
|
|
|
{
|
|
|
|
|
App.settings.Filter.EnableFilterPreview();
|
|
|
|
|
|
|
|
|
|
return base.OnEnterItem();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool OnExitItem()
|
|
|
|
|
{
|
|
|
|
|
App.settings.Filter.ShutDownFilterPreview();
|
|
|
|
|
|
|
|
|
|
return base.OnExitItem();
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-07 11:23:10 +08:00
|
|
|
|
protected override void GetVirtualListDatas(VirtualListDataHandle callback)
|
2024-12-27 16:40:33 +08:00
|
|
|
|
{
|
|
|
|
|
List<object> list = new List<object>();
|
2024-12-27 20:36:01 +08:00
|
|
|
|
foreach (var enumValue in Enum.GetValues(typeof(ScreenScaler.EnumScalerMode))) list.Add(enumValue);
|
2025-01-07 11:23:10 +08:00
|
|
|
|
|
|
|
|
|
var select = list.IndexOf(App.settings.ScreenScaler.GlobalMode);
|
|
|
|
|
if (select == -1) select = 0;
|
|
|
|
|
|
|
|
|
|
callback.Invoke(list, select);
|
2024-12-27 16:40:33 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|