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

◆ ScrollToActiveContainer() [2/2]

void LayoutHolder::ScrollToActiveContainer ( ScrollWidget sw)
inlineprotected

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

176 {
177 if (!sw)
178 return;
179
180 float x, y, y_s;
181 float f_y,f_h;
182 float amount;
183
184 sw.GetScreenPos(x, y);
185 sw.GetScreenSize(x, y_s);
187 f_h = GetFocusedContainerHeight(true);
188
189 float next_pos = f_y + f_h;
190 if (next_pos > (y + y_s))
191 {
192 amount = sw.GetVScrollPos() + next_pos - (y + y_s) + 2;
193 sw.VScrollToPos(amount);
194 }
195 else if (f_y < y)
196 {
197 amount = sw.GetVScrollPos() + f_y - y - 2;
198 sw.VScrollToPos(amount);
199 }
200
201 //CheckScrollbarVisibility();
202 }
Icon x
Icon y
float GetFocusedContainerYScreenPos(bool contents=false)
Определения Container.c:316
float GetFocusedContainerHeight(bool contents=false)
Определения Container.c:284

Перекрестные ссылки Container::GetFocusedContainerHeight(), Container::GetFocusedContainerYScreenPos(), x и y.