| 27616 | } |
| 27617 | |
| 27618 | void setCalloutBannerTextFormatted(const int player, Field* field, Uint32 color, std::set<int>& highlights, char const* const text, ...) |
| 27619 | { |
| 27620 | if ( !field ) { return; } |
| 27621 | |
| 27622 | char buf[256] = ""; |
| 27623 | va_list argptr; |
| 27624 | va_start(argptr, text); |
| 27625 | vsnprintf(buf, sizeof(buf), text, argptr); |
| 27626 | va_end(argptr); |
| 27627 | |
| 27628 | field->setText(buf); |
| 27629 | field->clearWordsToHighlight(); |
| 27630 | for ( auto v : highlights ) |
| 27631 | { |
| 27632 | field->addWordToHighlight(v, color); |
| 27633 | } |
| 27634 | } |
| 27635 | |
| 27636 | void setCalloutBannerTextUnformatted(const int player, Field* field, const char* iconName, const char* textKey, Uint32 color) |
| 27637 | { |
no test coverage detected