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

◆ MoveUpDownIcons()

void RightArea::MoveUpDownIcons ( )
inlineprotected

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

182 {
183 if (m_UpIcon && m_DownIcon)
184 {
185 m_UpIcon.Show( m_IsActive );
186 m_DownIcon.Show( m_IsActive );
187 if( m_IsActive )
188 {
189 float x, y;
190 m_UpIcon.GetScreenSize( x, y );
191
192 float top_y = GetCurrentContainerTopY();
193 m_UpIcon.SetPos( 0, Math.Clamp( top_y, 0, 99999 ) );
194
195 #ifndef PLATFORM_CONSOLE
196 float x2, y2;
197 m_DownIcon.GetScreenSize( x2, y2 );
198 float bottom_y = GetCurrentContainerBottomY() - y2;
199
200 float diff = bottom_y - ( top_y + y );
201 if( diff < 0 )
202 {
203 top_y += diff / 2;
204 bottom_y -= diff / 2;
205 }
206 m_DownIcon.SetPos( 0, bottom_y );
207 #endif
208 }
209 }
210 /*else
211 {
212 ErrorEx("up/down icons not present!");
213 }
214 #else
215 m_ScrollWidget.Update();
216 #endif*/
217
218 }
Icon x
Icon y
bool m_IsActive
Определения ModifierBase.c:19
Widget m_DownIcon
Определения RightArea.c:9
float GetCurrentContainerBottomY()
Определения RightArea.c:243
Widget m_UpIcon
Определения RightArea.c:8
float GetCurrentContainerTopY()
Определения RightArea.c:233

Перекрестные ссылки Math::Clamp(), GetCurrentContainerBottomY(), GetCurrentContainerTopY(), m_DownIcon, m_IsActive, m_UpIcon, x и y.

Используется в UpdateSelectionIcons().