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

◆ AddTab()

int ScriptedWidgetEventHandler::AddTab ( string name)
inlineprotected

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

162 {
163 int new_index = m_Tabs.Count();
164 Widget tab = GetGame().GetWorkspace().CreateWidgets( "gui/layouts/new_ui/tabber_prefab/tab.layout", m_Root );
165 Widget control = GetGame().GetWorkspace().CreateWidgets( "gui/layouts/new_ui/tabber_prefab/tab_control.layout", m_Root.FindAnyWidget( "Tab_Control_Container" ) );
166 TextWidget control_text = TextWidget.Cast( control.FindAnyWidget( "Tab_Control_x_Title" ) );
167
168 tab.SetName( "Tab_" + new_index );
169 control.SetName( "Tab_Control_" + new_index );
170 control_text.SetName( "Tab_Control_" + new_index + "_Title" );
171 control.FindAnyWidget( "Tab_Control_x_Background" ).SetName( "Tab_Control_" + new_index + "_Background" );
172
173 control_text.SetText( name );
174
175 control.SetHandler( this );
176 m_TabControls.Insert( new_index, control );
177 m_Tabs.Insert( new_index, tab );
178
179 AlignTabbers();
180
181 return new_index;
182 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native WorkspaceWidget GetWorkspace()
void AlignTabbers()
Определения TabberUI.c:108
Widget m_Root
Определения SizeToChild.c:9
ref map< int, Widget > m_Tabs
Определения TabberUI.c:9
ref map< int, Widget > m_TabControls
Определения TabberUI.c:8
proto native CGame GetGame()
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки AlignTabbers(), WorkspaceWidget::CreateWidgets(), GetGame(), CGame::GetWorkspace(), m_Root, m_TabControls, m_Tabs и name.