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

◆ MoveUpDownIcons()

void RightArea::MoveUpDownIcons ( )
inlineprotected

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

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

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

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