QcDebugOptions Struct
What the debug display shows (decision E-225): its level, switched by the debug key, and the visualisations, each switched on its own in the debug options (like Factorio's F4). More...
| Header: | #include <clientcore/settings/QcDebugOptions.h> |
Public Types
| enum class | Level { Off, Compact, Full } |
| enum class | Visual { ChunkBorders, Hitboxes, LightValues, MobGoals, RemeshFlash } |
Public Functions
| bool | anyVisual() const |
| void | save(QSettings &file) const |
| void | set(QcDebugOptions::Visual visual, bool on) |
| bool | shows(QcDebugOptions::Visual visual) const |
Public Variables
Static Public Members
| std::optional<QcDebugOptions::Level> | levelFromName(const QString &name) |
| QString | levelName(QcDebugOptions::Level level) |
| QcDebugOptions | load(const QSettings &file) |
| QcDebugOptions::Level | nextLevel(QcDebugOptions::Level level) |
| const int | visualCount |
| std::optional<QcDebugOptions::Visual> | visualFromId(const QString &id) |
| QString | visualId(QcDebugOptions::Visual visual) |
Detailed Description
Stored in settings.ini as debug/level and debug/<option>.
Member Type Documentation
enum class QcDebugOptions::Level
How much the debug display shows.
| Constant | Value | Description |
|---|---|---|
QcDebugOptions::Level::Off | 0 | nothing |
QcDebugOptions::Level::Compact | 1 | frame rate and frame times |
QcDebugOptions::Level::Full | 2 | everything: position, target, chunks, timings, graphs |
enum class QcDebugOptions::Visual
The visualisations drawn into the world.
| Constant | Value | Description |
|---|---|---|
QcDebugOptions::Visual::ChunkBorders | 0 | chunk and section borders |
QcDebugOptions::Visual::Hitboxes | 1 | entity boxes with their facing |
QcDebugOptions::Visual::LightValues | 2 | sky and block light around the target |
QcDebugOptions::Visual::MobGoals | 3 | the creatures' goals (hunted player, direction) |
QcDebugOptions::Visual::RemeshFlash | 4 | sections flash when they are meshed again |
Member Function Documentation
bool QcDebugOptions::anyVisual() const
Returns whether any visualisation is on.
[static] std::optional<QcDebugOptions::Level> QcDebugOptions::levelFromName(const QString &name)
Returns the level named name (levelName()); nothing for an unknown name.
[static] QString QcDebugOptions::levelName(QcDebugOptions::Level level)
Returns the name of level in settings.ini: "off", "compact" or "full".
[static] QcDebugOptions QcDebugOptions::load(const QSettings &file)
Returns the options stored in file. Missing or unknown values give the defaults; a file of an older version that has only showDebug (true or false) gets the compact level or none.
[static] QcDebugOptions::Level QcDebugOptions::nextLevel(QcDebugOptions::Level level)
Returns the level after level: off, compact, full, off ... (the debug key).
void QcDebugOptions::save(QSettings &file) const
Stores the options in file.
void QcDebugOptions::set(QcDebugOptions::Visual visual, bool on)
Switches visual on or off (on).
bool QcDebugOptions::shows(QcDebugOptions::Visual visual) const
Returns whether visual is on.
[static] std::optional<QcDebugOptions::Visual> QcDebugOptions::visualFromId(const QString &id)
Returns the visualisation with the id id (visualId()); nothing for an unknown id.
[static] QString QcDebugOptions::visualId(QcDebugOptions::Visual visual)
Returns the id of visual in settings.ini: "chunkBorders", "hitboxes", "lightValues", "mobGoals" or "remeshFlash".
Member Variable Documentation
QcDebugOptions::Level QcDebugOptions::level
The level of the debug display.
const int QcDebugOptions::visualCount
Number of visualisations.
std::array<bool, visualCount> QcDebugOptions::visuals
Which visualisations are on, indexed by Visual.