QcTexturePackLibrary Namespace
Where texture packs are found (decision E-297): built into the game (:/texturepacks/<folder>), in the player's data folder (<data>/texturepacks/<folder>) and inside installed mods (<mods>/<mod>/texturepacks/<folder>, decision E-302). More...
| Header: | #include <clientcore/texturepacks/QcTexturePackLibrary.h> |
Classes
| struct | Entry |
| struct | LoadedStack |
| struct | Root |
Variables
| const char *const | builtInDirectory |
| const int | maxPacks |
Functions
| QcTexturePackLibrary::LoadedStack | loadStack(const QStringList &ids, const QList<QcTexturePackLibrary::Entry> &entries, const QcTexturePackLoader::Limits &limits = {}) |
| QList<QcTexturePackLibrary::Root> | roots(const QString &modsDirectory) |
| QList<QcTexturePackLibrary::Entry> | scan(const QList<QcTexturePackLibrary::Root> &roots) |
| QString | userDirectory() |
| QStringList | withActive(QStringList active, const QString &id, bool on) |
| QStringList | withMoved(QStringList active, const QString &id, int steps) |
Detailed Description
Listing reads only the manifests.
Classes
class Entry
A pack folder found by scan(). More...
class LoadedStack
A stack as loaded, and the ids that could not be loaded. More...
class Root
A folder whose subfolders are texture packs. More...
Variable Documentation
const char *const QcTexturePackLibrary::builtInDirectory
Resource folder of the built-in packs.
const int QcTexturePackLibrary::maxPacks
Most pack folders scan() lists; further folders are skipped.
Function Documentation
QcTexturePackLibrary::LoadedStack QcTexturePackLibrary::loadStack(const QStringList &ids, const QList<QcTexturePackLibrary::Entry> &entries, const QcTexturePackLoader::Limits &limits = {})
Returns the packs with the given ids in that order (the first has the highest priority), loaded from the scanned entries; ids without an entry or whose manifest is invalid are left out and listed in missing; limits for every pack (with or without material maps).
QList<QcTexturePackLibrary::Root> QcTexturePackLibrary::roots(const QString &modsDirectory)
Returns the built-in folder, the user folder and the texture pack folders of the mods in modsDirectory ("" for none).
QList<QcTexturePackLibrary::Entry> QcTexturePackLibrary::scan(const QList<QcTexturePackLibrary::Root> &roots)
Returns every pack folder below roots, in the order of the roots and then by folder name.
QString QcTexturePackLibrary::userDirectory()
Returns the user's pack folder, <data>/texturepacks.
QStringList QcTexturePackLibrary::withActive(QStringList active, const QString &id, bool on)
Returns the active ids after switching id on (on; it goes on top, with the highest priority) or off.
QStringList QcTexturePackLibrary::withMoved(QStringList active, const QString &id, int steps)
Returns the active ids after moving id by steps places (negative: towards the highest priority).