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

◆ AlignTabbers()

void ScriptedWidgetEventHandler::AlignTabbers ( )
inlineprotected

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

109 {
110 float total_size;
111 float x, y;
112
113 Widget tab_controls_container = m_TabControlsRoot.FindAnyWidget( "Tab_Control_Container" );
114 Widget tab_controls_scroller = m_TabControlsRoot.FindAnyWidget( "Tab_Control_Scroller" );
115
116 m_TabControlsRoot.Update();
117 tab_controls_container.Update();
118
119 Widget tab_child = tab_controls_container.GetChildren();
120 while ( tab_child )
121 {
122 if ( tab_child.IsVisible() )
123 {
124 TextWidget tab_text = TextWidget.Cast( tab_child.FindAnyWidget( tab_child.GetName() + "_Title" ) );
125 int t_x, t_y;
126 tab_text.Update();
127 tab_text.GetTextSize( t_x, t_y );
128 tab_child.SetSize( t_x + 10 * m_ResolutionMultiplier, 1 );
129 tab_controls_container.Update();
130
131 total_size += ( t_x + 10 * m_ResolutionMultiplier );
132 }
133
134 tab_child = tab_child.GetSibling();
135 }
136
137 tab_child = tab_controls_container.GetChildren();
138
139 float x_f_c, y_f_c;
140 tab_controls_container.GetScreenPos( x_f_c, y_f_c );
141
142 while ( tab_child )
143 {
144 Widget tab_bg = tab_child.FindAnyWidget( tab_child.GetName() + "_Background" );
145 tab_child.GetScreenPos( x, y );
146 tab_bg.SetPos( ( x_f_c - x ), 0 );
147 tab_bg.SetSize( total_size, 1 );
148
149 tab_child = tab_child.GetSibling();
150 }
151
152 m_TabControlsRoot.GetSize( x, y );
153
154 m_TabControlsRoot.SetSize( total_size, y );
155 tab_controls_container.Update();
156 if (tab_controls_scroller)
157 tab_controls_scroller.Update();
158 m_TabControlsRoot.Update();
159 }
Icon x
Icon y
Widget m_TabControlsRoot
Определения TabberUI.c:5
float m_ResolutionMultiplier
Определения TabberUI.c:12
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки m_ResolutionMultiplier, m_TabControlsRoot, x и y.

Используется в AddTab(), EnableTabControl(), Init(), NextTab(), OnChildAdd(), OnChildRemove(), PerformSwitchTab() и PreviousTab().