OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
43 if (_game_mode == GM_MENU)
return INVALID_TE_ID;
67 void UpdateTextEffect(TextEffectID te_id,
StringID msg)
79 void RemoveTextEffect(TextEffectID te_id)
84 void MoveAllTextEffects(uint delta_ms)
88 if (count == 0)
return;
101 te.
top -= count * ZOOM_LVL_BASE;
106 void InitTextEffects()
@ TE_RISING
Make the text effect slowly go upwards.
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...
@ TO_LOADING
loading indicators
int32 center
The center position of the sign.
ClientSettings _settings_client
The current settings for this game.
StringID string_id
String to draw for the text effect, if INVALID_STRING_ID then it's not valid.
int32 top
The top of the sign.
Location information about a sign as seen on the viewport.
Container for all information about a text effect.
TextEffectMode
Text effect modes.
uint64 params_1
DParam parameter.
uint8 loading_indicators
show loading indicators
TextEffectMode mode
Type of text effect.
void MarkDirty(ZoomLevel maxzoom=ZOOM_LVL_MAX) const
Mark the sign dirty in all viewports.
@ ZOOM_LVL_OUT_8X
Zoomed 8 times out.
uint16 width_normal
The width when not zoomed out (normal font)
static uint64 GetDParam(uint n)
Get the current string parameter at index n from the global string parameter array.
static std::vector< struct TextEffect > _text_effects
Text effects are stored there.
void Reset()
Reset the text effect.
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.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
uint CountElapsed(uint delta)
Count how many times the interval has elapsed.
static const uint MILLISECONDS_PER_TICK
The number of milliseconds per game tick.
uint64 params_2
second DParam parameter
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
GUISettings gui
settings related to the GUI
Data about how and where to blit pixels.
uint8 duration
How long the text effect should stay, in ticks (applies only when mode == TE_RISING)