Fix: Update text effect size when font zoom is changed. (#9174)
(cherry picked from commit 18651dd8b1
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
f9a03c4e63
commit
43fe7463ba
@@ -227,6 +227,7 @@ void UpdateAllVirtCoords()
|
||||
UpdateAllStationVirtCoords();
|
||||
UpdateAllSignVirtCoords();
|
||||
UpdateAllTownVirtCoords();
|
||||
UpdateAllTextEffectVirtCoords();
|
||||
RebuildViewportKdtree();
|
||||
}
|
||||
|
||||
|
@@ -79,7 +79,16 @@ void UpdateTextEffect(TextEffectID te_id, StringID msg)
|
||||
te->params_1 = GetDParam(0);
|
||||
te->params_2 = GetDParam(1);
|
||||
|
||||
te->UpdatePosition(ZOOM_LVL_OUT_8X, te->center, te->top, msg);
|
||||
te->UpdatePosition(ZOOM_LVL_OUT_8X, te->center, te->top, te->string_id, te->string_id - 1);
|
||||
}
|
||||
|
||||
void UpdateAllTextEffectVirtCoords()
|
||||
{
|
||||
for (auto &te : _text_effects) {
|
||||
SetDParam(0, te.params_1);
|
||||
SetDParam(1, te.params_2);
|
||||
te.UpdatePosition(ZOOM_LVL_OUT_8X, te.center, te.top, te.string_id, te.string_id - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveTextEffect(TextEffectID te_id)
|
||||
|
@@ -32,6 +32,7 @@ void InitTextEffects();
|
||||
void DrawTextEffects(DrawPixelInfo *dpi);
|
||||
void UpdateTextEffect(TextEffectID effect_id, StringID msg);
|
||||
void RemoveTextEffect(TextEffectID effect_id);
|
||||
void UpdateAllTextEffectVirtCoords();
|
||||
|
||||
/* misc_gui.cpp */
|
||||
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour);
|
||||
|
Reference in New Issue
Block a user