QcWorldLabel Struct
A text floating in the world (showcase names, decision E-222). More...
| Header: | #include <common/world/QcWorldLabel.h> |
Public Functions
| QcWorldLabel | limited() const |
Public Variables
Static Public Members
| QString | limitedText(const QString &text) |
| const qsizetype | maxPerChunk |
| const qsizetype | maxTextLength |
Detailed Description
The server sends the labels of a chunk with it (QcMsg::ChunkLabels); the client translates text with the content's translations (an untranslated key is shown as it is), adds the plain detail line and draws the labels near the player when labels are switched on.
Member Function Documentation
QcWorldLabel QcWorldLabel::limited() const
Returns the label with text and detail line limited like that.
[static] QString QcWorldLabel::limitedText(const QString &text)
Returns text cut to at most maxTextLength UTF-16 units on a character boundary, ending in "…" when it was cut, so that the protocol accepts it.
Member Variable Documentation
QString QcWorldLabel::detail
A plain line below it; may be empty.
bool QcWorldLabel::heading
Titles of areas: larger and seen from further away.
const qsizetype QcWorldLabel::maxPerChunk
The most labels of one chunk the protocol accepts.
const qsizetype QcWorldLabel::maxTextLength
The longest text and detail line (UTF-16 units) the protocol accepts.
QcVec3 QcWorldLabel::position
Where it floats.
QString QcWorldLabel::text
The text or its translation key.