按键绑定功能
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user