24 std::vector<StringParameterData>
params;
43 if (_game_mode == GM_MENU)
return INVALID_TE_ID;
48 if (
_text_effects.size() >= INVALID_TE_ID)
return INVALID_TE_ID;
64 return static_cast<TextEffectID
>(it - std::begin(
_text_effects));
67 void UpdateTextEffect(TextEffectID te_id,
StringID msg)
78 void UpdateAllTextEffectVirtCoords()
87 void RemoveTextEffect(TextEffectID te_id)
107 te.
top -= count * ZOOM_BASE;
112 void InitTextEffects()
Types related to commands.
@ CMDPL_NO_CONSTRUCTION
No construction actions may be executed.
PauseMode _pause_mode
The current pause mode.
void MarkDirty(ZoomLevel maxzoom=ZOOM_LVL_MAX) const
Mark the sign dirty in all viewports.
A number of safeguards to prevent using unsafe methods.
GameSettings _settings_game
Game settings of a running game or the scenario editor.
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.
void CopyOutDParam(std::vector< StringParameterData > &backup, size_t num)
Copy num string parameters from the global string parameter array to the backup.
void CopyInDParam(const std::span< const StringParameterData > backup)
Copy the parameters from the backup into the global string parameter array.
bool HaveDParamChanged(const std::span< const StringParameterData > backup)
Checks whether the global string parameters have changed compared to the given backup.
Functions related to OTTD's strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
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
uint8_t command_pause_level
level/amount of commands that can't be executed while paused
Data about how and where to blit pixels.
uint8_t loading_indicators
show loading indicators
ConstructionSettings construction
construction of things in-game
Container for all information about a text effect.
TextEffectMode mode
Type of text effect.
uint8_t duration
How long the text effect should stay, in ticks (applies only when mode == TE_RISING)
StringID string_id
String to draw for the text effect, if INVALID_STRING_ID then it's not valid.
std::vector< StringParameterData > params
Backup of string parameters.
void Reset()
Reset the text effect.
Location information about a sign as seen on the viewport.
int32_t center
The center position of the sign.
uint16_t width_normal
The width when not zoomed out (normal font)
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
int32_t top
The top of the sign.
static std::vector< struct TextEffect > _text_effects
Text effects are stored there.
IntervalTimer< TimerWindow > move_all_text_effects_interval
Slowly move text effects upwards.
Functions related to text effects.
TextEffectMode
Text effect modes.
@ TE_RISING
Make the text effect slowly go upwards.
Definition of Interval and OneShot timers.
Definition of the Window system.
Functions related to transparency.
@ TO_TEXT
loading and cost/income text
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...
void ViewportAddString(const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, Colours colour)
Add a string to draw in the viewport.
Functions related to (drawing on) viewports.
@ ZOOM_LVL_TEXT_EFFECT
All zoom levels above this will not show text effects.