String class, substitute for CStr, but that parses the tags and builds up a list of all text that will be different when outputted.
More...
#include <CGUIString.h>
String class, substitute for CStr, but that parses the tags and builds up a list of all text that will be different when outputted.
The difference between CGUIString and CGUIText is that CGUIString is a string-class that parses the tags when the value is set. The CGUIText is just a container which stores the positions and settings of all text-calls that will have to be made to the Renderer.
◆ GenerateTextCall()
void CGUIString::GenerateTextCall |
( |
const CGUI & |
pGUI, |
|
|
SFeedback & |
Feedback, |
|
|
CStrIntern |
DefaultFont, |
|
|
const int & |
from, |
|
|
const int & |
to, |
|
|
const bool |
FirstLine, |
|
|
const IGUIObject * |
pObject = nullptr |
|
) |
| const |
Generate Text Call from specified range.
The range must span only within ONE TextChunk though. Otherwise it can't be fit into a single Text Call
Notice it won't make it complete, you will have to add X/Y values and such.
- Parameters
-
pGUI | Pointer to CGUI object making this call, for e.g. icon retrieval. |
Feedback | contains all info that is generated. |
DefaultFont | Default Font |
from | From character n, |
to | to character n. |
FirstLine | Whether this is the first line of text, to calculate its height correctly |
pObject | Only for Error outputting, optional! If nullptr then no Errors will be reported! Useful when you need to make several GenerateTextCall in different phases, it avoids duplicates. |
◆ GetOriginalString()
const CStrW & CGUIString::GetOriginalString |
( |
| ) |
const |
|
inline |
◆ GetRawString()
const CStrW & CGUIString::GetRawString |
( |
| ) |
const |
|
inline |
Get String, stripped of tags.
◆ SetValue()
void CGUIString::SetValue |
( |
const CStrW & |
str | ) |
|
Set the value, the string will automatically be parsed when set.
◆ m_OriginalString
CStrW CGUIString::m_OriginalString |
|
private |
The original string value passed to SetValue.
◆ m_RawString
CStrW CGUIString::m_RawString |
|
private |
The full raw string.
Stripped of tags.
◆ m_TextChunks
std::vector<TextChunk> CGUIString::m_TextChunks |
|
private |
◆ m_Words
std::vector<int> CGUIString::m_Words |
The documentation for this class was generated from the following files:
- /home/docker/jenkins/workspace/technical-docs/source/gui/SettingTypes/CGUIString.h
- /home/docker/jenkins/workspace/technical-docs/source/gui/SettingTypes/CGUIString.cpp