MCPcopy Create free account
hub / github.com/MyGUI/mygui / setVScrollPosition

Method setVScrollPosition

MyGUIEngine/src/MyGUI_EditBox.cpp:2070–2085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2068 }
2069
2070 void EditBox::setVScrollPosition(size_t _index)
2071 {
2072 if (mClientText == nullptr)
2073 return;
2074
2075 if (_index > mVRange)
2076 _index = mVRange;
2077
2078 IntPoint point = mClientText->getViewOffset();
2079 point.top = _index;
2080
2081 mClientText->setViewOffset(point);
2082 // обновить скролы
2083 if (mVScroll != nullptr)
2084 mVScroll->setScrollPosition(point.top);
2085 }
2086
2087 size_t EditBox::getHScrollRange() const
2088 {

Callers 2

Calls 3

getViewOffsetMethod · 0.45
setViewOffsetMethod · 0.45
setScrollPositionMethod · 0.45

Tested by

no test coverage detected