| 795 | } |
| 796 | |
| 797 | void ThemeSetColour(WindowClass wc, uint8_t index, ColourWithFlags colour) |
| 798 | { |
| 799 | UIThemeWindowEntry entry{}; |
| 800 | entry.Class = wc; |
| 801 | |
| 802 | auto currentEntry = const_cast<UIThemeWindowEntry*>(ThemeManager::CurrentTheme->GetEntry(wc)); |
| 803 | if (currentEntry != nullptr) |
| 804 | { |
| 805 | entry.Theme = currentEntry->Theme; |
| 806 | } |
| 807 | else |
| 808 | { |
| 809 | const WindowThemeDesc* desc = GetWindowThemeDescriptor(wc); |
| 810 | if (desc == nullptr) |
| 811 | { |
| 812 | return; |
| 813 | } |
| 814 | entry.Theme = desc->windowColours.defaultTheme; |
| 815 | } |
| 816 | |
| 817 | entry.Theme.Colours[index] = colour; |
| 818 | ThemeManager::CurrentTheme->SetEntry(&entry); |
| 819 | |
| 820 | ThemeSave(); |
| 821 | } |
| 822 | |
| 823 | uint8_t ThemeGetFlags() |
| 824 | { |
no test coverage detected