summaryrefslogtreecommitdiff
path: root/src/texteff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/texteff.cpp')
-rw-r--r--src/texteff.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/texteff.cpp b/src/texteff.cpp
index 981453c10..fd2001716 100644
--- a/src/texteff.cpp
+++ b/src/texteff.cpp
@@ -20,6 +20,7 @@
/** Container for all information about a text effect */
struct TextEffect : public ViewportSign {
uint64 params_1; ///< DParam parameter
+ uint64 params_2; ///< second DParam parameter
StringID string_id; ///< String to draw for the text effect, if INVALID_STRING_ID then it's not valid
uint8 duration; ///< How long the text effect should stay, in ticks (applies only when mode == TE_RISING)
TextEffectMode mode; ///< Type of text effect
@@ -52,6 +53,7 @@ TextEffectID AddTextEffect(StringID msg, int center, int y, uint8 duration, Text
te->string_id = msg;
te->duration = duration;
te->params_1 = GetDParam(0);
+ te->params_2 = GetDParam(1);
te->mode = mode;
/* Make sure we only dirty the new area */
@@ -68,6 +70,7 @@ void UpdateTextEffect(TextEffectID te_id, StringID msg)
if (msg == te->string_id && GetDParam(0) == te->params_1) return;
te->string_id = msg;
te->params_1 = GetDParam(0);
+ te->params_2 = GetDParam(1);
te->UpdatePosition(te->center, te->top, msg);
}
@@ -109,7 +112,7 @@ void DrawTextEffects(DrawPixelInfo *dpi)
for (TextEffect *te = _text_effects.Begin(); te != end; te++) {
if (te->string_id == INVALID_STRING_ID) continue;
if (te->mode == TE_RISING || (_settings_client.gui.loading_indicators && !IsTransparencySet(TO_LOADING))) {
- ViewportAddString(dpi, ZOOM_LVL_OUT_8X, te, te->string_id, te->string_id - 1, 0, te->params_1);
+ ViewportAddString(dpi, ZOOM_LVL_OUT_8X, te, te->string_id, te->string_id - 1, 0, te->params_1, te->params_2);
}
}
}