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

Function setFollowerBannerText

src/interface/interface.cpp:2019–2033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2017}
2018
2019void setFollowerBannerText(const int player, Field* field, const char* iconName, const char* textKey, Uint32 color)
2020{
2021 if ( !field ) { return; }
2022 if ( FollowerMenu[player].iconEntries.find(iconName) == FollowerMenu[player].iconEntries.end() )
2023 {
2024 return;
2025 }
2026 auto& textMap = FollowerMenu[player].iconEntries[iconName].text_map[textKey];
2027 field->setText(textMap.first.c_str());
2028 field->clearWordsToHighlight();
2029 for ( auto v : textMap.second )
2030 {
2031 field->addWordToHighlight(v, color);
2032 }
2033}
2034
2035std::vector<FollowerRadialMenu::PanelEntry>& getPanelEntriesForFollower(bool isTinkeringCreation)
2036{

Callers 1

drawFollowerMenuMethod · 0.85

Calls 5

c_strMethod · 0.80
endMethod · 0.45
setTextMethod · 0.45
clearWordsToHighlightMethod · 0.45
addWordToHighlightMethod · 0.45

Tested by

no test coverage detected