Refactored Achievement Badges into Texture Layers

Achievement badges/icons are refactored into the type CustomTextureData::ArraySlice::Level as that is the data type images loaded from the filesystem will be. This includes everything that uses the badges in the Qt UI and OnScreenDisplay, and similarly removes the OSD::Icon type because Level already contains that information.
This commit is contained in:
LillyJadeKatrin
2024-05-13 00:15:21 -04:00
parent 75465f00cc
commit dc8f3f6eae
9 changed files with 83 additions and 101 deletions

View File

@ -358,7 +358,7 @@ void OnScreenUI::DrawChallengesAndLeaderboards()
TextureConfig tex_config(width, height, 1, 1, 1, AbstractTextureFormat::RGBA8, 0,
AbstractTextureType::Texture_2DArray);
auto res = m_challenge_texture_map.insert_or_assign(name, g_gfx->CreateTexture(tex_config));
res.first->second->Load(0, width, height, width, icon->rgba_data.data(),
res.first->second->Load(0, width, height, width, icon->data.data(),
sizeof(u32) * width * height);
}
for (auto& [name, texture] : m_challenge_texture_map)