22 return any_cast<HCURSOR>(
images.at(pathToCursor).data);
27 const any* result =
nullptr;
29 for (
const auto& [path, data] :
images)
31 if (data.index == cursorIndex)
39 throw out_of_range(
"Wrong index");
42 return any_cast<HCURSOR>(*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
CursorsHolder(uint16_t imagesWidth, uint16_t imagesHeight, size_t count=standard_sizes::defaultImagesCount)
HCURSOR getCursor(const std::filesystem::path &pathToCursor) const
uint16_t addImage(const std::filesystem::path &pathToCursor) override