MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SetMainPlayerControlText

Function SetMainPlayerControlText

engine/Poseidon/UI/OptionsUIApp.cpp:148–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 {IDC_MAIN_CREDITS, "STR_CREDITS23"},
147};
148
149static void SetMainPlayerControlText(IControl* ctrl)
150{
151 if (!ctrl)
152 return;
153
154 char buffer[256];
155 snprintf(buffer, sizeof(buffer), LocalizeString(IDS_MAIN_PLAYER), (const char*)Glob.header.playerName);
156
157 if (CActiveText* text = dynamic_cast<CActiveText*>(ctrl))
158 text->SetText(buffer);
159 else if (CStatic* text = dynamic_cast<CStatic*>(ctrl))
160 text->SetText(buffer);
161}
162
163static const char* kLangRotation[] = {

Callers 3

RefreshLanguageMethod · 0.85
OnCreateCtrlMethod · 0.85
OnDrawMethod · 0.85

Calls 2

LocalizeStringFunction · 0.85
SetTextMethod · 0.45

Tested by

no test coverage detected