master #63

Merged
sin365 merged 7 commits from Alienjack/AxibugEmuOnline:master into master 2024-12-13 16:04:01 +08:00
6 changed files with 34 additions and 24 deletions
Showing only changes of commit 382322c8c8 - Show all commits

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a25a763784438ee40892d9d4cf4606df guid: e043954733c440645ba43b09301ee4a6
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
serializedVersion: 2 serializedVersion: 2
filterMode: 1 filterMode: 0
aniso: 1 aniso: 1
mipBias: 0 mipBias: 0
wrapU: 1 wrapU: 1
@ -69,10 +69,10 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 4 - serializedVersion: 4
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: 4
textureCompression: 1 textureCompression: 2
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

View File

@ -15218,7 +15218,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: a25a763784438ee40892d9d4cf4606df, type: 3} m_Sprite: {fileID: 21300000, guid: e043954733c440645ba43b09301ee4a6, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1

View File

@ -1,4 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -25,6 +25,7 @@ namespace AxibugEmuOnline.Client
protected override void GetVirtualListDatas(Action<object> datas) protected override void GetVirtualListDatas(Action<object> datas)
{ {
List<object> list = new List<object>(); List<object> list = new List<object>();
list.Add(null);
list.AddRange(App.filter.Filters.Select(f => (object)f)); list.AddRange(App.filter.Filters.Select(f => (object)f));
datas.Invoke(list); datas.Invoke(list);
} }

View File

@ -1,4 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.UI; using AxibugEmuOnline.Client.UI;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -9,7 +9,7 @@ using static AxibugEmuOnline.Client.FilterManager;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client
{ {
/// <summary> /// <summary>
/// 背景颜色设置UI /// 背景颜色设置UI
/// </summary> /// </summary>
public class UI_FilterItem : MenuItem, IVirtualItem public class UI_FilterItem : MenuItem, IVirtualItem
{ {
@ -25,7 +25,10 @@ namespace AxibugEmuOnline.Client
private void UpdateView() private void UpdateView()
{ {
SetBaseInfo(Datacontext.Name, $"参数数量:{Datacontext.Paramerters.Count}", null); if (Datacontext == null)
SetBaseInfo("无", null, null);
else
SetBaseInfo(Datacontext.Name, $"参数数量:{Datacontext.Paramerters.Count}", null);
} }
public void SetDependencyProperty(object data) public void SetDependencyProperty(object data)
@ -35,7 +38,10 @@ namespace AxibugEmuOnline.Client
if (m_select) if (m_select)
{ {
App.filter.EnableFilterPreview(); App.filter.EnableFilterPreview();
App.filter.EnableFilter(Datacontext); if (App.filter != null)
App.filter.EnableFilter(Datacontext);
else
App.filter.ShutDownFilter();
} }
} }
@ -43,16 +49,19 @@ namespace AxibugEmuOnline.Client
public override bool OnEnterItem() public override bool OnEnterItem()
{ {
var opts = new List<OptionMenu>(); if (Datacontext != null && Datacontext.Paramerters.Count > 0)
opts.Add(new Opt_CreatePreset(Datacontext));
opts.AddRange(Datacontext.Presets.Select(p => new Opt_Presets(Datacontext, p)));
OverlayManager.PopSideBar(opts, onClose: () =>
{ {
App.filter.EnableFilterPreview(); var opts = new List<OptionMenu>();
Datacontext.ResetPreset(); opts.Add(new Opt_CreatePreset(Datacontext));
App.filter.EnableFilter(Datacontext); opts.AddRange(Datacontext.Presets.Select(p => new Opt_Presets(Datacontext, p)));
});
OverlayManager.PopSideBar(opts, onClose: () =>
{
App.filter.EnableFilterPreview();
Datacontext.ResetPreset();
App.filter.EnableFilter(Datacontext);
});
}
return false; return false;
} }
@ -61,7 +70,7 @@ namespace AxibugEmuOnline.Client
{ {
private Filter m_filter; private Filter m_filter;
public Opt_CreatePreset(Filter filter) : base("创建滤镜预设", Resources.LoadAll<Sprite>("Icons/XMB-Icons/misc")[0]) public Opt_CreatePreset(Filter filter) : base("创建滤镜预设", Resources.LoadAll<Sprite>("Icons/XMB-Icons/misc")[0])
{ {
m_filter = filter; m_filter = filter;
} }
@ -81,7 +90,7 @@ namespace AxibugEmuOnline.Client
var result = m_filter.CreatePreset(presetName, out var newPreset); var result = m_filter.CreatePreset(presetName, out var newPreset);
if (!result) OverlayManager.PopTip(result); if (!result) OverlayManager.PopTip(result);
else optionUI.AddOptionMenuWhenPoping(new Opt_Presets(m_filter, newPreset)); else optionUI.AddOptionMenuWhenPoping(new Opt_Presets(m_filter, newPreset));
}, "为预设设置一个名称", string.Empty); }, "为预设设置一个名称", string.Empty);
} }
} }
public class Opt_Presets : ExpandMenu public class Opt_Presets : ExpandMenu
@ -170,7 +179,7 @@ namespace AxibugEmuOnline.Client
private Filter m_filter; private Filter m_filter;
private FilterPreset m_preset; private FilterPreset m_preset;
public Opt_Delete(Filter filter, FilterPreset preset) : base("删除预设", null) public Opt_Delete(Filter filter, FilterPreset preset) : base("删除预设", null)
{ {
m_filter = filter; m_filter = filter;
m_preset = preset; m_preset = preset;