| 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 | { |
no test coverage detected