summaryrefslogtreecommitdiff
path: root/src/texteff.hpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-21 16:17:47 +0000
committertruelight <truelight@openttd.org>2007-06-21 16:17:47 +0000
commit56eb1738ee6de39367047a3cd0f20011560eb393 (patch)
tree9a8cf5e86397687ed30d3da2567447b1d843509d /src/texteff.hpp
parent2792019b78fbfd10702b93a2d570562397cf8cb2 (diff)
downloadopenttd-56eb1738ee6de39367047a3cd0f20011560eb393.tar.xz
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
Diffstat (limited to 'src/texteff.hpp')
-rw-r--r--src/texteff.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/texteff.hpp b/src/texteff.hpp
new file mode 100644
index 000000000..96971d8ef
--- /dev/null
+++ b/src/texteff.hpp
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+#ifndef TEXTEFF_HPP
+#define TEXTEFF_HPP
+
+/**
+ * Text effect modes.
+ */
+enum TextEffectMode {
+ TE_RISING, ///< Make the text effect slowly go upwards
+ TE_STATIC, ///< Keep the text effect static
+
+ INVALID_TE_ID = 0xFFFF,
+};
+
+typedef uint16 TextEffectID;
+
+void MoveAllTextEffects();
+TextEffectID AddTextEffect(StringID msg, int x, int y, uint16 duration, TextEffectMode mode);
+void InitTextEffects();
+void DrawTextEffects(DrawPixelInfo *dpi);
+void UpdateTextEffect(TextEffectID effect_id, StringID msg);
+void RemoveTextEffect(TextEffectID effect_id);
+
+void InitTextMessage();
+void DrawTextMessage();
+void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...);
+void UndrawTextMessage();
+
+/* misc_gui.cpp */
+TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent);
+void UpdateFillingPercent(TextEffectID te_id, uint8 percent);
+void HideFillingPercent(TextEffectID te_id);
+
+#endif /* TEXTEFF_HPP */