| 115 | } |
| 116 | |
| 117 | void DrawTextEffects(DrawPixelInfo *dpi) |
| 118 | { |
| 119 | /* Don't draw the text effects when zoomed out a lot */ |
| 120 | if (dpi->zoom > ZoomLevel::TextEffect) return; |
| 121 | if (IsTransparencySet(TO_TEXT)) return; |
| 122 | |
| 123 | ViewportStringFlags flags{}; |
| 124 | if (dpi->zoom >= ZoomLevel::TextEffect) flags.Set(ViewportStringFlag::Small); |
| 125 | |
| 126 | for (const TextEffect &te : _text_effects) { |
| 127 | if (!te.IsValid()) continue; |
| 128 | |
| 129 | if (te.mode == TE_RISING || _settings_client.gui.loading_indicators) { |
| 130 | std::string *str = ViewportAddString(dpi, &te, flags, INVALID_COLOUR); |
| 131 | if (str == nullptr) continue; |
| 132 | |
| 133 | *str = te.msg.GetDecodedString(); |
| 134 | } |
| 135 | } |
| 136 | } |
no test coverage detected