22 return any_cast<HBITMAP>(
images.at(pathToImage).data);
27 const any* result =
nullptr;
29 for (
const auto& [path, data] :
images)
31 if (data.index == imageIndex)
39 throw out_of_range(
"Wrong index");
42 return any_cast<HBITMAP>(*result);
Base class for all visual asset loaders.
virtual uint16_t insertImage(const std::filesystem::path &pathToImage, imageType type) final
std::unordered_map< std::wstring, imageData > images
uint16_t addImage(const std::filesystem::path &pathToImage) override
ImagesHolder(uint16_t imagesWidth, uint16_t imagesHeight, size_t count=standard_sizes::defaultImagesCount)
HBITMAP getImage(const std::filesystem::path &pathToImage) const