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

Function LoadThemeByConfigName

src/openrct2-ui/interface/Theme.cpp:641–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639 }
640
641 static bool LoadThemeByConfigName(const utf8* name)
642 {
643 for (size_t i = 0; i < AvailableThemes.size(); i++)
644 {
645 const auto& theme = AvailableThemes[i];
646 if (String::equals(name, theme.Name))
647 {
648 if (theme.Path.empty())
649 {
650 LoadTheme(const_cast<UITheme*>(kPredefinedThemes[i].Theme));
651 }
652 else
653 {
654 LoadTheme(theme.Path);
655 }
656 ActiveAvailableThemeIndex = i;
657 return true;
658 }
659 }
660 return false;
661 }
662
663 static void Initialise()
664 {

Callers 1

InitialiseFunction · 0.85

Calls 4

equalsFunction · 0.85
LoadThemeFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected