UI 系统
This commit is contained in:
@@ -129,6 +129,12 @@ namespace BaseGames.UI.Inventory
|
||||
if (_tabs[i].content != null && _tabs[i].content.name == contentName) { SelectTab(i); return; }
|
||||
}
|
||||
|
||||
/// <summary>当前选中 Tab 的内容根名(如 "Content_Map");无有效 Tab 时为 null。供"同键 toggle"判断当前是否已在目标 Tab。</summary>
|
||||
public string CurrentContentName
|
||||
=> _tabs != null && _currentIndex >= 0 && _currentIndex < _tabs.Length && _tabs[_currentIndex].content != null
|
||||
? _tabs[_currentIndex].content.name
|
||||
: null;
|
||||
|
||||
private void SelectTab(int index, bool raise, bool animateEntry)
|
||||
{
|
||||
if (_tabs == null || _tabs.Length == 0) return;
|
||||
|
||||
Reference in New Issue
Block a user