MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / LanguageOpen

Function LanguageOpen

src/openrct2/localisation/Language.cpp:77–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 bool LanguageOpen(int32_t id)
78 {
79 auto context = GetContext();
80 auto& localisationService = context->GetLocalisationService();
81 auto& objectManager = context->GetObjectManager();
82 try
83 {
84 localisationService.OpenLanguage(id);
85 // Objects and their localised strings need to be refreshed
86 objectManager.ResetObjects();
87 Drawing::ScrollingText::invalidate();
88 WindowNotifyLanguageChange();
89 return true;
90 }
91 catch (const std::exception&)
92 {
93 return false;
94 }
95 }
96
97 void LanguageFreeObjectString(StringId stringId)
98 {

Callers 2

SetUpTestCaseMethod · 0.85
CultureDropdownMethod · 0.85

Calls 5

GetContextFunction · 0.85
OpenLanguageMethod · 0.80
ResetObjectsMethod · 0.80
invalidateFunction · 0.50

Tested by 1

SetUpTestCaseMethod · 0.68