Codefix: Documentation comment in IndustryDirectoryWindow (#13059)
[openttd-github.git] / src / texteff.hpp
blobdad9b5888dade10e8dee4859d9bd7f62670d83b3
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file texteff.hpp Functions related to text effects. */
10 #ifndef TEXTEFF_HPP
11 #define TEXTEFF_HPP
13 #include "economy_type.h"
14 #include "gfx_type.h"
15 #include "strings_type.h"
17 /**
18 * Text effect modes.
20 enum TextEffectMode : uint8_t {
21 TE_RISING, ///< Make the text effect slowly go upwards
22 TE_STATIC, ///< Keep the text effect static
25 using TextEffectID = uint16_t;
27 static const TextEffectID INVALID_TE_ID = UINT16_MAX;
29 TextEffectID AddTextEffect(StringID msg, int x, int y, uint8_t duration, TextEffectMode mode);
30 void InitTextEffects();
31 void DrawTextEffects(DrawPixelInfo *dpi);
32 void UpdateTextEffect(TextEffectID effect_id, StringID msg);
33 void RemoveTextEffect(TextEffectID effect_id);
34 void UpdateAllTextEffectVirtCoords();
36 /* misc_gui.cpp */
37 TextEffectID ShowFillingPercent(int x, int y, int z, uint8_t percent, StringID colour);
38 void UpdateFillingPercent(TextEffectID te_id, uint8_t percent, StringID colour);
39 void HideFillingPercent(TextEffectID *te_id);
41 void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
42 void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income);
44 #endif /* TEXTEFF_HPP */