* Draws the text list and all the text contained within. */
| 870 | * Draws the text list and all the text contained within. |
| 871 | */ |
| 872 | void TextList::draw() |
| 873 | { |
| 874 | Surface::draw(); |
| 875 | int y = 0; |
| 876 | if (!_rows.empty()) |
| 877 | { |
| 878 | if (_scroll > 0 && _rows[_scroll] == _rows[_scroll-1]) |
| 879 | y -= _font->getHeight() + _font->getSpacing(); |
| 880 | for (size_t i = _rows[_scroll]; i < _texts.size() && i < _rows[_scroll] + _visibleRows; ++i) |
| 881 | { |
| 882 | for (std::vector<Text*>::iterator j = _texts[i].begin(); j < _texts[i].end(); ++j) |
| 883 | { |
| 884 | (*j)->setY(y); |
| 885 | (*j)->blit(this); |
| 886 | } |
| 887 | if (!_texts[i].empty()) |
| 888 | { |
| 889 | y += _texts[i].front()->getHeight() + _font->getSpacing(); |
| 890 | } |
| 891 | else |
| 892 | { |
| 893 | y += _font->getHeight() + _font->getSpacing(); |
| 894 | } |
| 895 | } |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | /** |
| 900 | * Blits the text list and selector. |
nothing calls this directly
no test coverage detected