OpenTTD Source 20250428-master-ga5578166bb
|
Container for all information about a text effect. More...
Public Member Functions | |
void | Reset () |
Reset the text effect. | |
bool | IsValid () const |
![]() | |
auto | operator<=> (const ViewportSign &) const =default |
void | UpdatePosition (int center, int top, std::string_view str, std::string_view str_small={}) |
Update the position of the viewport sign. | |
void | MarkDirty (ZoomLevel maxzoom=ZOOM_LVL_MAX) const |
Mark the sign dirty in all viewports. | |
Data Fields | |
TextEffectMode | mode |
Type of text effect. | |
uint8_t | duration |
How long the text effect should stay, in ticks (applies only when mode == TE_RISING) | |
EncodedString | msg |
Encoded message for text effect. | |
![]() | |
int32_t | center = 0 |
The center position of the sign. | |
int32_t | top = 0 |
The top of the sign. | |
uint16_t | width_normal = 0 |
The width when not zoomed out (normal font) | |
uint16_t | width_small = 0 |
The width when zoomed out (small font) | |
Container for all information about a text effect.
Definition at line 23 of file texteff.cpp.
|
inline |
Definition at line 36 of file texteff.cpp.
|
inline |
Reset the text effect.
Definition at line 29 of file texteff.cpp.
References ViewportSign::MarkDirty(), TE_INVALID, and ViewportSign::width_normal.
uint8_t TextEffect::duration |
How long the text effect should stay, in ticks (applies only when mode == TE_RISING)
Definition at line 25 of file texteff.cpp.
TextEffectMode TextEffect::mode |
Type of text effect.
Definition at line 24 of file texteff.cpp.
EncodedString TextEffect::msg |
Encoded message for text effect.
Definition at line 26 of file texteff.cpp.