快捷键操作

This commit is contained in:
bob
2025-06-04 12:55:36 +08:00
parent 30836558ae
commit 55f49e1af7
8 changed files with 90 additions and 32 deletions

View File

@@ -1,7 +1,33 @@
namespace NBF
using System;
using FairyGUI;
using NBC;
using UIPanel = NBC.UIPanel;
namespace NBF
{
[AttributeUsage(AttributeTargets.Method)]
public class UIInputListenAttribute : BaseAttribute
{
}
public static class UIInputExtensions
{
public static void AutoListenInput(this GComponent panel)
{
var ms = Reflection.GetMethodsWithUIInputAttribute(panel.GetType(), typeof(UIInputListenAttribute));
foreach (var method in ms)
{
Log.Error(method.Name);
}
}
public static void AutoListenInput(this UIPanel panel)
{
var ms = Reflection.GetMethodsWithUIInputAttribute(panel.GetType(), typeof(UIInputListenAttribute));
foreach (var method in ms)
{
Log.Error(method.Name);
}
}
}
}