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

◆ OnMouseWheel()

override bool ScrollBarContainer::OnMouseWheel ( Widget w,
int x,
int y,
int wheel )
inlineprotected

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

221 {
222 if (m_scrolling || m_content_height <= m_root_height) return false;
223
224 float step = (1.0 / (m_content_height - m_root_height)) * WHEEL_STEP;
225 m_position -= wheel * step;
226
227 if (m_position < 0) m_position = 0;
228 if (m_position > 1) m_position = 1;
230 return true;
231 }
float m_content_height
Определения ScrollBarContainer.c:12
float m_root_height
Определения ScrollBarContainer.c:11
const int WHEEL_STEP
Определения ScrollBarContainer.c:10
float m_position
Определения ScrollBarContainer.c:13
bool m_scrolling
Определения ScrollBarContainer.c:14
void UpdateScroller()
Определения ScrollBarContainer.c:104

Перекрестные ссылки m_content_height, m_position, m_root_height, m_scrolling, UpdateScroller(), WHEEL_STEP, x и y.