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

Method RefreshLanguage

engine/Poseidon/UI/DisplayUIMenus.cpp:678–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676 if (std::filesystem::is_directory(FilesystemPathFromUtf8(profileDir), ec))
677 {
678 // player already exist
679 CreateMsgBox(MB_BUTTON_OK, LocalizeString(IDS_MSG_PLAYER_EXIST));
680 return false;
681 }
682 }
683 }
684
685 return true;
686}
687
688void DisplayNewUser::RefreshLanguage()
689{
690 if (auto* title = dynamic_cast<CStatic*>(GetCtrl(IDC_NEW_USER_TITLE)))
691 {
692 title->SetText(LocalizeString(_edit ? IDS_NEWUSER_TITLE2 : IDS_NEWUSER_TITLE1));
693 }
694
695 if (auto* text = dynamic_cast<C3DStatic*>(GetCtrl(IDC_NEW_USER_ID)))
696 {
697 char buffer[256];
698 snprintf(buffer, sizeof(buffer), LocalizeString(IDS_PLAYER_ID), (const char*)::GetPublicKey());
699 text->SetText(buffer);

Callers

nothing calls this directly

Calls 5

GetCtrlFunction · 0.85
LocalizeStringFunction · 0.85
GetPublicKeyFunction · 0.85
SetMaxCharsMethod · 0.80
SetTextMethod · 0.45

Tested by

no test coverage detected