44 if (_game_mode == GM_MENU)
return INVALID_TE_ID;
47 for (i = 0; i < _text_effects.
Length(); i++) {
68 void UpdateTextEffect(TextEffectID te_id,
StringID msg)
80 void RemoveTextEffect(TextEffectID te_id)
82 _text_effects[te_id].
Reset();
85 void MoveAllTextEffects()
92 if (te->duration-- == 0) {
98 te->top -= ZOOM_LVL_BASE;
103 void InitTextEffects()
105 _text_effects.
Reset();
Functions related to OTTD's strings.
uint64 params_2
second DParam parameter
Data about how and where to blit pixels.
Simple vector class that allows allocating an item without the need to copy this->data needlessly...
StringID string_id
String to draw for the text effect, if INVALID_STRING_ID then it's not valid.
void Reset()
Remove all items from the list and free allocated memory.
const T * Begin() const
Get the pointer to the first item (const)
Simple vector template class.
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
const T * End() const
Get the pointer behind the last valid item (const)
void MarkDirty(ZoomLevel maxzoom=ZOOM_LVL_MAX) const
Mark the sign dirty in all viewports.
T * Append(uint to_add=1)
Append an item and return it.
Functions related to (drawing on) viewports.
uint Length() const
Get the number of items in the list.
int32 top
The top of the sign.
uint64 params_1
DParam parameter.
ClientSettings _settings_client
The current settings for this game.
Types related to global configuration settings.
Definition of base types and functions in a cross-platform compatible way.
Location information about a sign as seen on the viewport.
TextEffectMode mode
Type of text effect.
A number of safeguards to prevent using unsafe methods.
uint16 width_normal
The width when not zoomed out (normal font)
uint32 StringID
Numeric value that represents a string, independent of the selected language.
int32 center
The center position of the sign.
GUISettings gui
settings related to the GUI
static uint64 GetDParam(uint n)
Get the current string parameter at index n from the global string parameter array.
Functions related to transparency.
static SmallVector< struct TextEffect, 32 > _text_effects
Text effects are stored there.
void Reset()
Reset the text effect.
uint8 loading_indicators
show loading indicators
Make the text effect slowly go upwards.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
const T * Get(uint index) const
Get the pointer to item "number" (const)
void ViewportAddString(const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2, Colours colour)
Add a string to draw in the viewport.
Functions related to text effects.
uint8 duration
How long the text effect should stay, in ticks (applies only when mode == TE_RISING) ...
TextEffectMode
Text effect modes.
Container for all information about a text effect.
static bool IsTransparencySet(TransparencyOption to)
Check if the transparency option bit is set and if we aren't in the game menu (there's never transpar...