完成列表选择器
This commit is contained in:
@@ -54,18 +54,16 @@ namespace NBF
|
||||
{
|
||||
_selector.Down();
|
||||
}
|
||||
else if (action == InputDef.UI.Enter)
|
||||
{
|
||||
var selectedItem = _selector.SelectedItem;
|
||||
if (selectedItem != null)
|
||||
{
|
||||
OnClickItem?.Invoke(selectedItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// private void SetListSelected(int selectedIndex)
|
||||
// {
|
||||
// if (selectedIndex >= 0 && selectedIndex < _listData.Count)
|
||||
// {
|
||||
// var count = List.numChildren;
|
||||
// List.selectedIndex = selectedIndex;
|
||||
// List.ScrollToView(selectedIndex);
|
||||
// }
|
||||
// }
|
||||
|
||||
public void SetListData(List<object> listData,
|
||||
ListSelectionMode selectionMode = ListSelectionMode.Single)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user