MCPcopy Create free account
hub / github.com/TurningWheel/Barony / setCalloutBannerTextFormatted

Function setCalloutBannerTextFormatted

src/interface/interface.cpp:27618–27634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27616}
27617
27618void 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
27636void setCalloutBannerTextUnformatted(const int player, Field* field, const char* iconName, const char* textKey, Uint32 color)
27637{

Callers 1

setCalloutTextMethod · 0.85

Calls 3

setTextMethod · 0.45
clearWordsToHighlightMethod · 0.45
addWordToHighlightMethod · 0.45

Tested by

no test coverage detected