QcGamepadGlyphs Namespace
How the buttons of a family are drawn in hints and named in help texts (decision E-612), as plain shapes and letters, no logos: a shape (a disc with a letter, the four PlayStation shapes, a shoulder or trigger tab, a stick, the d-pad cross with one arm lit, a diamond of four dots with one lit for the face buttons of a generic pad), its text and a colour role. More...
| Header: | #include <clientcore/input/QcGamepadGlyphs.h> |
Classes
| struct | Glyph |
Types
| enum class | Shape { Label, Cross, Circle, Square, Triangle, …, Dpad } |
Functions
| QcGamepadFamily | family(QcGamepadType type) |
| std::optional<QcGamepadFamily> | familyFromName(const QString &name) |
| QString | familyName(QcGamepadFamily family) |
| std::optional<QcGamepadGlyphs::Glyph> | glyph(QcGamepadFamily family, const QString &input) |
| QString | text(QcGamepadFamily family, const QString &input) |
Detailed Description
The game draws them (QcPadGlyphPainter in PadGlyph.qml). The inputs are named like the control interface's buttons ("south", "dpadLeft", "leftShoulder", ...), plus "leftTrigger"/"rightTrigger" and "leftStickMove"/"rightStickMove" for the triggers and the tilted sticks.
Classes
class Glyph
A glyph: its shape, the text in it, its colour role and the lit direction. More...
Type Documentation
enum class QcGamepadGlyphs::Shape
The shape a glyph is drawn as.
| Constant | Value | Description |
|---|---|---|
QcGamepadGlyphs::Shape::Label | 0 | A disc with a letter or a word (face buttons, Back, Start, Guide). |
QcGamepadGlyphs::Shape::Cross | 1 | the PlayStation cross |
QcGamepadGlyphs::Shape::Circle | 2 | the PlayStation circle |
QcGamepadGlyphs::Shape::Square | 3 | the PlayStation square |
QcGamepadGlyphs::Shape::Triangle | 4 | the PlayStation triangle |
QcGamepadGlyphs::Shape::Position | 5 | A diamond of four dots, the one in direction lit (face buttons of a generic pad). |
QcGamepadGlyphs::Shape::Shoulder | 6 | a shoulder tab with its letter |
QcGamepadGlyphs::Shape::Trigger | 7 | a trigger tab with its letter |
QcGamepadGlyphs::Shape::Stick | 8 | A stick, clicked or tilted, with its letter. |
QcGamepadGlyphs::Shape::Dpad | 9 | The d-pad cross with the arm in direction lit. |
Function Documentation
QcGamepadFamily QcGamepadGlyphs::family(QcGamepadType type)
Returns the family of the labels on a pad of type.
std::optional<QcGamepadFamily> QcGamepadGlyphs::familyFromName(const QString &name)
Returns the family named name (familyName()); nullopt for an unknown name.
QString QcGamepadGlyphs::familyName(QcGamepadFamily family)
Returns the name of family: "generic", "xbox", "playstation" or "nintendo".
std::optional<QcGamepadGlyphs::Glyph> QcGamepadGlyphs::glyph(QcGamepadFamily family, const QString &input)
Returns the glyph of input (names above) on a pad of family; nullopt for an unknown name.
QString QcGamepadGlyphs::text(QcGamepadFamily family, const QString &input)
Returns input of a pad of family in running text: the glyph's label, the PlayStation shapes as ✕ ○ □ △, the d-pad as ▲ ▼ ◀ ▶. Empty for the face buttons of a generic pad (the caller words their position) and unknown names.