提交遗漏的文件
This commit is contained in:
parent
cc281a9ea2
commit
4722473896
@ -0,0 +1,63 @@
|
||||
using AxibugEmuOnline.Client.ClientCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using static AxibugEmuOnline.Client.FilterManager;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class InGameUI_FilterSetting : ExpandMenu
|
||||
{
|
||||
private InGameUI m_gameUI;
|
||||
|
||||
public InGameUI_FilterSetting(InGameUI gameUI) : base("Â˾µ", null)
|
||||
{
|
||||
m_gameUI = gameUI;
|
||||
}
|
||||
|
||||
protected override List<OptionMenu> GetOptionMenus()
|
||||
{
|
||||
return App.filter.Filters.Select(f => new FilterMenu(m_gameUI.RomFile, f) as OptionMenu).ToList();
|
||||
}
|
||||
|
||||
public class FilterMenu : ExpandMenu
|
||||
{
|
||||
private Filter m_filter;
|
||||
private List<OptionMenu> m_presetsMenuItems;
|
||||
|
||||
public FilterMenu(RomFile rom, Filter filter) : base(filter.Name, null)
|
||||
{
|
||||
m_filter = filter;
|
||||
m_presetsMenuItems = new List<OptionMenu> { new FilterPresetMenu(rom, m_filter, m_filter.DefaultPreset) };
|
||||
m_presetsMenuItems.AddRange(m_filter.Presets.Select(preset => new FilterPresetMenu(rom, m_filter, preset)));
|
||||
}
|
||||
|
||||
protected override List<OptionMenu> GetOptionMenus()
|
||||
{
|
||||
return m_presetsMenuItems;
|
||||
}
|
||||
}
|
||||
|
||||
public class FilterPresetMenu : ExecuteMenu
|
||||
{
|
||||
private FilterPreset m_preset;
|
||||
private RomFile m_rom;
|
||||
private Filter m_filter;
|
||||
|
||||
public FilterPresetMenu(RomFile rom, Filter filter, FilterPreset preset) : base(preset.Name, null)
|
||||
{
|
||||
m_preset = preset;
|
||||
m_rom = rom;
|
||||
m_filter = filter;
|
||||
}
|
||||
|
||||
public override void OnExcute(OptionUI optionUI, ref bool cancelHide)
|
||||
{
|
||||
m_filter.ApplyPreset(m_preset);
|
||||
App.filter.EnableFilter(m_filter);
|
||||
|
||||
App.filter.SetupFilter(m_rom, m_filter, m_preset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6c80949e93f37f42a1af843fa9d77fa
|
Loading…
Reference in New Issue
Block a user