MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / blit

Method blit

src/Interface/TextList.cpp:903–926  ·  view source on GitHub ↗

* Blits the text list and selector. * @param surface Pointer to surface to blit onto. */

Source from the content-addressed store, hash-verified

901 * @param surface Pointer to surface to blit onto.
902 */
903void TextList::blit(Surface *surface)
904{
905 if (_visible && !_hidden)
906 {
907 _selector->blit(surface);
908 }
909 Surface::blit(surface);
910 if (_visible && !_hidden)
911 {
912 if (_arrowPos != -1 && !_rows.empty())
913 {
914 for (size_t i = _rows[_scroll]; i < _texts.size() && i < _rows[_scroll] + _visibleRows; ++i)
915 {
916 _arrowLeft[i]->setY(getY() + (i - _scroll) * (_font->getHeight() + _font->getSpacing()));
917 _arrowLeft[i]->blit(surface);
918 _arrowRight[i]->setY(getY() + (i - _scroll) * (_font->getHeight() + _font->getSpacing()));
919 _arrowRight[i]->blit(surface);
920 }
921 }
922 _up->blit(surface);
923 _down->blit(surface);
924 _scrollbar->blit(surface);
925 }
926}
927
928/**
929 * Passes events to arrow buttons.

Callers 2

updateArrowsMethod · 0.45
drawMethod · 0.45

Calls 4

getSpacingMethod · 0.80
emptyMethod · 0.45
setYMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected