| 94 | } |
| 95 | |
| 96 | void CMenuBackground::LoadThemeIcon(CTheme &Theme) |
| 97 | { |
| 98 | char aIconPath[IO_MAX_PATH_LENGTH]; |
| 99 | str_format(aIconPath, sizeof(aIconPath), "themes/%s.png", Theme.m_Name.empty() ? "none" : Theme.m_Name.c_str()); |
| 100 | Theme.m_IconTexture = Graphics()->LoadTexture(aIconPath, IStorage::TYPE_ALL); |
| 101 | |
| 102 | char aBuf[32 + IO_MAX_PATH_LENGTH]; |
| 103 | if(Theme.m_IconTexture.IsNullTexture()) |
| 104 | str_format(aBuf, sizeof(aBuf), "failed to load theme icon '%s'", aIconPath); |
| 105 | else |
| 106 | str_format(aBuf, sizeof(aBuf), "loaded theme icon '%s'", aIconPath); |
| 107 | Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "menuthemes", aBuf); |
| 108 | } |
| 109 | |
| 110 | int CMenuBackground::ThemeScan(const char *pName, int IsDir, int DirType, void *pUser) |
| 111 | { |
no test coverage detected