#include <sprite_text.hpp>
◆ TextEffect
An enumeration of the different text effects. This contains:
None
, DropShadow
and Outline
.
Enumerator |
---|
None | |
DropShadow | |
Outline | |
◆ SpriteText() [1/3]
mage::rendering::SpriteText::SpriteText |
( |
| ) |
|
Constructs a sprite text.
◆ SpriteText() [2/3]
mage::rendering::SpriteText::SpriteText |
( |
const SpriteText & |
sprite | ) |
|
|
default |
Constructs a sprite text from the given sprite text.
- Parameters
-
[in] | sprite | A reference to the sprite text to copy. |
◆ SpriteText() [3/3]
mage::rendering::SpriteText::SpriteText |
( |
SpriteText && |
sprite | ) |
|
|
defaultnoexcept |
Constructs a sprite text by moving the given sprite text.
- Parameters
-
[in] | sprite | A reference to the sprite text to move. |
◆ ~SpriteText()
mage::rendering::SpriteText::~SpriteText |
( |
| ) |
|
|
virtualdefault |
Destruct this sprite text.
◆ AppendText()
void mage::rendering::SpriteText::AppendText |
( |
ColorString |
text | ) |
|
Appends the given text to the end of the text of this sprite text.
- Parameters
-
◆ ClearText()
void mage::rendering::SpriteText::ClearText |
( |
| ) |
|
|
noexcept |
Clears the text of this sprite text.
◆ Draw()
void mage::rendering::SpriteText::Draw |
( |
SpriteBatch & |
sprite_batch | ) |
const |
Draws this sprite text.
- Parameters
-
[in,out] | sprite_batch | A reference to the sprite batch used for rendering this sprite text. |
◆ ForEachColorString() [1/2]
template<typename ActionT >
void mage::rendering::SpriteText::ForEachColorString |
( |
ActionT && |
action | ) |
|
Traverses all color strings of this sprite text.
- Template Parameters
-
ActionT | An action to perform on all color strings of this sprite text. The action must accept ColorString& values. |
- Parameters
-
◆ ForEachColorString() [2/2]
template<typename ActionT >
void mage::rendering::SpriteText::ForEachColorString |
( |
ActionT && |
action | ) |
const |
Traverses all color strings of this sprite text.
- Template Parameters
-
ActionT | An action to perform on all color strings of this sprite text. The action must accept const ColorString& values. |
- Parameters
-
◆ GetFont()
Returns the font of this sprite text.
- Returns
- A pointer to the font of this sprite text.
◆ GetFontSRV()
ID3D11ShaderResourceView* mage::rendering::SpriteText::GetFontSRV |
( |
| ) |
const |
|
noexcept |
Returns the shader resource view of the font of this sprite text.
- Returns
- A pointer to the shader resource view of the font of this sprite text.
◆ GetSpriteEffects()
SpriteEffect mage::rendering::SpriteText::GetSpriteEffects |
( |
| ) |
const |
|
noexcept |
Returns the sprite effects of this sprite text.
- Returns
- The sprite effects of this sprite text.
◆ GetSpriteTransform() [1/2]
Returns the sprite transform of this sprite text.
- Returns
- A reference to the sprite transform of this sprite text.
◆ GetSpriteTransform() [2/2]
Returns the sprite transform of this sprite text.
- Returns
- A reference to the sprite transform of this sprite text.
◆ GetText()
const std::vector< ColorString >& mage::rendering::SpriteText::GetText |
( |
| ) |
const |
|
noexcept |
Returns the text of this sprite text.
- Returns
- A reference to a vector containing the color strings of this sprite text.
◆ GetTextEffect()
TextEffect mage::rendering::SpriteText::GetTextEffect |
( |
| ) |
const |
|
noexcept |
Returns the text effect of this sprite text.
- Returns
- The text effect of this sprite text.
◆ GetTextEffectColor() [1/2]
RGBA& mage::rendering::SpriteText::GetTextEffectColor |
( |
| ) |
|
|
noexcept |
Returns the (linear) text effect color of this sprite text.
- Returns
- A reference to the (linear) text effect color of this sprite text.
◆ GetTextEffectColor() [2/2]
const RGBA& mage::rendering::SpriteText::GetTextEffectColor |
( |
| ) |
const |
|
noexcept |
Returns the (linear) text effect color of this sprite text.
- Returns
- A reference to the (linear) text effect color of this sprite text.
◆ operator=() [1/2]
Copies the given sprite text to this sprite text.
- Parameters
-
[in] | sprite | A reference to the sprite text to copy. |
- Returns
- A reference to the copy of the given sprite text (i.e. this sprite text).
◆ operator=() [2/2]
Moves the given sprite text to this sprite text.
- Parameters
-
[in] | sprite | A reference to the sprite text to move. |
- Returns
- A reference to the moved sprite text (i.e. this sprite text).
◆ SetFont()
Sets the font of this sprite text to the given font.
- Parameters
-
[in] | font | A pointer to the font of this sprite text. |
◆ SetSpriteEffects()
void mage::rendering::SpriteText::SetSpriteEffects |
( |
SpriteEffect |
sprite_effects | ) |
|
|
noexcept |
Sets the sprite effects of this sprite text to the given sprite effects.
- Parameters
-
[in] | sprite_effects | The sprite effects. |
◆ SetText()
void mage::rendering::SpriteText::SetText |
( |
ColorString |
text | ) |
|
Sets the text of this sprite text to the given text.
- Parameters
-
◆ SetTextEffect()
void mage::rendering::SpriteText::SetTextEffect |
( |
TextEffect |
text_effect | ) |
|
|
noexcept |
Sets the text effect of this sprite text to the given text effect.
- Parameters
-
[in] | text_effect | The text effect. |
◆ m_font
A pointer to the sprite font of this sprite text.
◆ m_sprite_effects
The sprite effects of this sprite text.
◆ m_sprite_transform
The sprite transform of this sprite text.
◆ m_strings
std::vector< ColorString > mage::rendering::SpriteText::m_strings |
|
private |
A vector with the color strings of this sprite text.
◆ m_text_effect
TextEffect mage::rendering::SpriteText::m_text_effect |
|
private |
The text effect of this sprite text.
◆ m_text_effect_color
RGBA mage::rendering::SpriteText::m_text_effect_color |
|
private |
The (linear) text effect color of this sprite text.