| 173 | //----------------------------------------------------------------------------- |
| 174 | |
| 175 | void GuiArrayCtrl::scrollCellVisible(Point2I cell) |
| 176 | { |
| 177 | //make sure we have a parent |
| 178 | //make sure we have a valid cell selected |
| 179 | GuiScrollCtrl *parent = dynamic_cast<GuiScrollCtrl*>(getParent()); |
| 180 | if(!parent || cell.x < 0 || cell.y < 0) |
| 181 | return; |
| 182 | |
| 183 | RectI cellBounds(cell.x * mCellSize.x, cell.y * mCellSize.y, mCellSize.x, mCellSize.y); |
| 184 | parent->scrollRectVisible(cellBounds); |
| 185 | } |
| 186 | |
| 187 | //----------------------------------------------------------------------------- |
| 188 |
no test coverage detected