DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SelectTabByID()

void SelectTabByID ( int tabId)
protected

См. определение в файле ScriptConsole.c строка 738

739 {
741
742 if (!tab)
743 {
744 // Find the tab entry in registry
745 ScriptConsoleTabRegistryEntry foundEntry = null;
747 foreach (ScriptConsoleTabRegistryEntry entry : tabEntries)
748 {
749 if (entry.m_ID == tabId)
750 {
751 foundEntry = entry;
752 break;
753 }
754 }
755
756 if (foundEntry)
757 {
758 // Get the button and panel widget
759 ButtonWidget elementButton = GetContextElementButton(tabId);
760 Widget panel = layoutRoot.FindAnyWidget(foundEntry.m_PanelWidgetName);
761 if (panel && elementButton)
762 {
763 // Instantiate the tab using typename
764 tab = ScriptConsoleTabBase.Cast(foundEntry.m_TabClass.Spawn());
765 tab.InitializeTab(panel, this, elementButton);
766
767 // Register tab
768 RegisterTab(foundEntry.m_ID, tab);
769 }
770 }
771 }
772
773 if (tab)
774 {
775 SelectTab(tab);
776
777 foreach (int elementID, ScriptConsoleMenuElement element : m_ContextMenuElements)
778 {
779 element.SetTextAlignment(m_CurrentInputDevice);
780
781 if (elementID == tabId)
782 {
783 element.Select();
784 }
785 else
786 {
787 element.Deselect();
788 }
789 }
790 }
791 }
ButtonWidget GetContextElementButton(int tabID)
Определения ScriptConsole.c:823
ref map< int, ref ScriptConsoleTabBase > m_TabHandlersByID
Определения ScriptConsole.c:107
ref map< int, ref ScriptConsoleMenuElement > m_ContextMenuElements
Определения ScriptConsole.c:111
void ScriptConsoleTabRegistryEntry(int id, string displayName, string panelWidgetName, typename tabClass)
Определения ScriptConsole.c:24
void RegisterTab(int id, ScriptConsoleTabBase handler)
Определения ScriptConsole.c:193
void SelectTab(ScriptConsoleTabBase selectedHandler)
Определения ScriptConsole.c:793
void InitializeTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleTabBase.c:19
static array< ref ScriptConsoleTabRegistryEntry > GetAll()
Определения ScriptConsole.c:45
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.

Перекрестные ссылки ScriptConsoleTabRegistry::GetAll(), GetContextElementButton(), ScriptConsoleTabBase::InitializeTab(), m_ContextMenuElements, m_CurrentInputDevice, m_TabHandlersByID, RegisterTab(), ScriptConsoleTabRegistryEntry() и SelectTab().

Используется в Init() и Update().