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

Method setHScrollPosition

MyGUIEngine/src/MyGUI_EditBox.cpp:2097–2112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2095 }
2096
2097 void EditBox::setHScrollPosition(size_t _index)
2098 {
2099 if (mClientText == nullptr)
2100 return;
2101
2102 if (_index > mHRange)
2103 _index = mHRange;
2104
2105 IntPoint point = mClientText->getViewOffset();
2106 point.left = _index;
2107
2108 mClientText->setViewOffset(point);
2109 // обновить скролы
2110 if (mHScroll != nullptr)
2111 mHScroll->setScrollPosition(point.left);
2112 }
2113
2114 bool EditBox::getInvertSelected() const
2115 {

Callers 2

setFunction · 0.80

Calls 3

getViewOffsetMethod · 0.45
setViewOffsetMethod · 0.45
setScrollPositionMethod · 0.45

Tested by

no test coverage detected