#pragma once #include #include #include #include namespace geode::texture_loader { inline bool isLoaded() { return geode::Loader::get()->isModLoaded("geode.texture-loader"); } struct Pack { std::string id; std::string name; VersionInfo version; std::vector authors; /// Path from where the pack originates from. May be a file (apk, zip) or a folder std::filesystem::path path; /// Path where the resources are located. This is what is added to the search path std::filesystem::path resourcesPath; }; namespace impl { using EventGetAvailablePacks = geode::DispatchEvent*>; using EventGetAppliedPacks = geode::DispatchEvent*>; } inline std::vector getAvailablePacks() { std::vector result; impl::EventGetAvailablePacks("geode.texture-loader/v1/get-available-packs", &result).post(); return result; } inline std::vector getAppliedPacks() { std::vector result; impl::EventGetAppliedPacks("geode.texture-loader/v1/get-applied-packs", &result).post(); return result; } }