| 643 | } |
| 644 | |
| 645 | void ListBox::beginToItemAt(size_t _index) |
| 646 | { |
| 647 | MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ListBox::beginToItemAt"); |
| 648 | if (mRangeIndex <= 0) |
| 649 | return; |
| 650 | |
| 651 | int offset = (int)_index * mHeightLine; |
| 652 | if (offset >= mRangeIndex) |
| 653 | offset = mRangeIndex; |
| 654 | |
| 655 | if (mWidgetScroll != nullptr) |
| 656 | { |
| 657 | if ((int)mWidgetScroll->getScrollPosition() == offset) |
| 658 | return; |
| 659 | mWidgetScroll->setScrollPosition(offset); |
| 660 | } |
| 661 | notifyScrollChangePosition(nullptr, offset); |
| 662 | } |
| 663 | |
| 664 | // видим ли мы элемент, полностью или нет |
| 665 | bool ListBox::isItemVisibleAt(size_t _index, bool _fill) |