OpenTTD Source 20241224-master-gee860a5c8e
TextEffect Struct Reference

Container for all information about a text effect. More...

Inheritance diagram for TextEffect:
ViewportSign

Public Member Functions

void Reset ()
 Reset the text effect.
 
- Public Member Functions inherited from ViewportSign
auto operator<=> (const ViewportSign &) const =default
 
void UpdatePosition (int center, int top, StringID str, StringID str_small=STR_NULL)
 Update the position of the viewport sign.
 
void MarkDirty (ZoomLevel maxzoom=ZOOM_LVL_MAX) const
 Mark the sign dirty in all viewports.
 

Data Fields

std::vector< StringParameterData > params
 Backup of string parameters.
 
StringID string_id
 String to draw for the text effect, if INVALID_STRING_ID then it's not valid.
 
uint8_t duration
 How long the text effect should stay, in ticks (applies only when mode == TE_RISING)
 
TextEffectMode mode
 Type of text effect.
 
- Data Fields inherited from ViewportSign
int32_t center
 The center position of the sign.
 
int32_t top
 The top of the sign.
 
uint16_t width_normal
 The width when not zoomed out (normal font)
 
uint16_t width_small
 The width when zoomed out (small font)
 

Detailed Description

Container for all information about a text effect.

Definition at line 23 of file texteff.cpp.

Member Function Documentation

◆ Reset()

void TextEffect::Reset ( )
inline

Reset the text effect.

Definition at line 30 of file texteff.cpp.

References INVALID_STRING_ID, ViewportSign::MarkDirty(), and ViewportSign::width_normal.

Field Documentation

◆ duration

uint8_t TextEffect::duration

How long the text effect should stay, in ticks (applies only when mode == TE_RISING)

Definition at line 26 of file texteff.cpp.

◆ mode

TextEffectMode TextEffect::mode

Type of text effect.

Definition at line 27 of file texteff.cpp.

◆ params

std::vector<StringParameterData> TextEffect::params

Backup of string parameters.

Definition at line 24 of file texteff.cpp.

◆ string_id

StringID TextEffect::string_id

String to draw for the text effect, if INVALID_STRING_ID then it's not valid.

Definition at line 25 of file texteff.cpp.


The documentation for this struct was generated from the following file: