OpenTTD Source  1.11.0-beta2
texteff.hpp
Go to the documentation of this file.
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  */
7 
10 #ifndef TEXTEFF_HPP
11 #define TEXTEFF_HPP
12 
13 #include "economy_type.h"
14 #include "gfx_type.h"
15 #include "strings_type.h"
16 
23 
24  INVALID_TE_ID = 0xFFFF,
25 };
26 
27 typedef uint16 TextEffectID;
28 
29 void MoveAllTextEffects(uint delta_ms);
30 TextEffectID AddTextEffect(StringID msg, int x, int y, uint8 duration, TextEffectMode mode);
31 void InitTextEffects();
32 void DrawTextEffects(DrawPixelInfo *dpi);
33 void UpdateTextEffect(TextEffectID effect_id, StringID msg);
34 void RemoveTextEffect(TextEffectID effect_id);
35 
36 /* misc_gui.cpp */
37 TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour);
38 void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour);
39 void HideFillingPercent(TextEffectID *te_id);
40 
41 void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
42 void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income);
43 
44 #endif /* TEXTEFF_HPP */
TE_RISING
@ TE_RISING
Make the text effect slowly go upwards.
Definition: texteff.hpp:21
TE_STATIC
@ TE_STATIC
Keep the text effect static.
Definition: texteff.hpp:22
HideFillingPercent
void HideFillingPercent(TextEffectID *te_id)
Hide vehicle loading indicators.
Definition: misc_gui.cpp:668
strings_type.h
TextEffectMode
TextEffectMode
Text effect modes.
Definition: texteff.hpp:20
ShowFillingPercent
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour)
Display vehicle loading indicators.
Definition: misc_gui.cpp:641
ShowCostOrIncomeAnimation
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
Display animated income or costs on the map.
Definition: misc_gui.cpp:593
StringID
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Definition: strings_type.h:16
OverflowSafeInt< int64, INT64_MAX, INT64_MIN >
UpdateFillingPercent
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour)
Update vehicle loading indicators.
Definition: misc_gui.cpp:656
economy_type.h
gfx_type.h
DrawPixelInfo
Data about how and where to blit pixels.
Definition: gfx_type.h:155
ShowFeederIncomeAnimation
void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income)
Display animated feeder income.
Definition: misc_gui.cpp:614