UI 系统

This commit is contained in:
2026-06-09 10:41:43 +08:00
parent 247de307c6
commit e09bee31ec
31 changed files with 221439 additions and 997 deletions

View File

@@ -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;