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

◆ ScrollToPos()

void ScrollBarContainer::ScrollToPos ( float pos)
inlineprotected

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

49 {
50 m_root.Update();
51 Content.Update();
52 float width;
53
54 m_root.GetScreenSize(width, m_root_height);
55 Content.GetScreenSize(width, m_content_height);
56
57 float diff = m_root_height / m_content_height;
58 float percents = pos / m_content_height;
59
60 m_position = percents;
61
62 if (m_position < 0)
63 m_position = 0;
64 if (m_position > 1 - diff)
65 m_position = 1 - diff;
67 }
float m_content_height
Определения ScrollBarContainer.c:12
float m_root_height
Определения ScrollBarContainer.c:11
Widget m_root
Определения ScrollBarContainer.c:8
Widget Content
Определения ScrollBarContainer.c:5
float m_position
Определения ScrollBarContainer.c:13
void UpdateScroller()
Определения ScrollBarContainer.c:104

Перекрестные ссылки Content, m_content_height, m_position, m_root, m_root_height и UpdateScroller().