QtCraft API C++ classes QML types Handbook

QcWebHandbookAssets Namespace

The pictures and colours of the web handbook (web/handbook/data): all item icons on one sheet, so the page loads one image instead of hundreds, and the colours of the game's screens as CSS variables, so the page looks like the handbook in the game (QcUiPalette). More...

Header: #include <clientcore/icons/QcWebHandbookAssets.h>

Functions

QList<QcHandbookMarkdown::File> iconSheet(const QHash<QString, QImage> &icons)
QHash<QString, QImage> readSheet(const QImage &sheet, const QByteArray &index)
QcHandbookMarkdown::File theme()

Detailed Description

Function Documentation

QList<QcHandbookMarkdown::File> QcWebHandbookAssets::iconSheet(const QHash<QString, QImage> &icons)

Returns icons.png of icons (cells row by row, items sorted by name) and icons.json {"size", "columns", "icons": {item name: cell index}}.

QHash<QString, QImage> QcWebHandbookAssets::readSheet(const QImage &sheet, const QByteArray &index)

Returns the cells of the icon sheet sheet back as images by item name, read with its index (icons.json; for tests).

QcHandbookMarkdown::File QcWebHandbookAssets::theme()

Returns theme.css: one variable –qc-<name> per QcUiPalette role (Theme.<name> in QML).