按键绑定功能

This commit is contained in:
bob
2025-06-19 18:15:15 +08:00
parent 240a6d3887
commit 8a8821c2e6
72 changed files with 1196 additions and 401 deletions

View File

@@ -64,7 +64,7 @@ namespace NBF
{
// TextTitle.text = Lan.Get(_currentGroup);
_nowSelectIndex = -1;
List.RemoveChildrenToPool();
if (string.IsNullOrEmpty(_currentTab)) return;
var options = Settings.Instance.GetOptionsByTab(_currentTab);
Dictionary<string, List<OptionBase>> groupOptions = new Dictionary<string, List<OptionBase>>();
@@ -80,6 +80,10 @@ namespace NBF
}
_canSelectIndex.Clear();
List.RemoveChildrenToPool();
var url = UIPackage.GetItemURL(UIPackName, "SettingSubTitleItem");
foreach (var key in groupOptions.Keys)
{
@@ -91,11 +95,23 @@ namespace NBF
foreach (var option in value)
{
if (List.AddItemFromPool() is SettingItem item)
if (option is InputOption)
{
item.SetData(option);
var index = List.GetChildIndex(item);
_canSelectIndex.Add(index);
if (List.AddItemFromPool(SettingInputItem.URL) is SettingInputItem item)
{
item.SetData(option);
var index = List.GetChildIndex(item);
_canSelectIndex.Add(index);
}
}
else
{
if (List.AddItemFromPool() is SettingItem item)
{
item.SetData(option);
var index = List.GetChildIndex(item);
_canSelectIndex.Add(index);
}
}
}
}