From 0506120ede82d6f7d09886cdf35f7f94f65a4c2d Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Fri, 13 Dec 2024 17:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=86=85=E6=BB=A4=E9=95=9C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A2=9E=E5=8A=A0=E5=8F=96=E6=B6=88=E6=BB=A4?= =?UTF-8?q?=E9=95=9C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/InGameUI/InGameUI_FilterSetting.cs | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs index 563c471..dcfa000 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_FilterSetting.cs @@ -1,6 +1,9 @@ -using AxibugEmuOnline.Client.ClientCore; +using AxibugEmuOnline.Client.ClientCore; using System.Collections.Generic; using System.Linq; +using UnityEditor.Presets; +using UnityEngine; +using VirtualNes.Core; using static AxibugEmuOnline.Client.FilterManager; namespace AxibugEmuOnline.Client @@ -9,14 +12,34 @@ namespace AxibugEmuOnline.Client { private InGameUI m_gameUI; - public InGameUI_FilterSetting(InGameUI gameUI) : base("˾", null) + public InGameUI_FilterSetting(InGameUI gameUI) : base("滤镜", null) { m_gameUI = gameUI; } protected override List GetOptionMenus() { - return App.filter.Filters.Select(f => new FilterMenu(m_gameUI.RomFile, f) as OptionMenu).ToList(); + List menus = new List(); + menus.Add(new FilterNone(m_gameUI.RomFile)); + menus.AddRange(App.filter.Filters.Select(f => new FilterMenu(m_gameUI.RomFile, f) as OptionMenu)); + return menus; + } + + public class FilterNone : ExecuteMenu + { + private RomFile m_rom; + + public FilterNone(RomFile rom) : base("取消滤镜", null) + { + m_rom = rom; + } + + public override void OnExcute(OptionUI optionUI, ref bool cancelHide) + { + App.filter.ShutDownFilter(); + + App.filter.SetupFilter(m_rom, null, null); + } } public class FilterMenu : ExpandMenu