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

◆ ScrollFixedAmount()

void ScrollBarContainer::ScrollFixedAmount ( bool down,
float amount )
inlineprotected

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

25 {
26 m_root.Update();
27 Content.Update();
28 float width;
29
30 m_root.GetScreenSize(width, m_root_height);
31 Content.GetScreenSize(width, m_content_height);
32
33 float diff = m_root_height / m_content_height;
34 float one_percent = diff / 100;
35 float percents = amount / m_content_height;
36 //float step = (1.0 / (m_content_height - m_root_height)) * WHEEL_STEP;
37 float step = (percents/100);
38 if(down)
39 m_position += 1 * ( percents + 0.05 );
40 else
41 m_position -= 1 * ( percents + 0.05 );
42
43 if (m_position < 0) m_position = 0;
44 if (m_position > 1 - diff) m_position = 1 - diff;
46 }
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().