src/texteff.hpp
author rubidium
Sun, 01 Jun 2008 16:45:32 +0000
branch0.6
changeset 10801 3ad9dfb5430d
parent 7950 3d3ed007127a
child 9269 742671e649bb
permissions -rw-r--r--
(svn r13352) [0.6] -Backport from trunk (r13348, r13222, r13221, r13217):
- Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348)
- Fix: Attempts to make the old AI perform better (r13217, r13221, r13222)
/* $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 InitChatMessage();
void DrawChatMessage();
void CDECL AddChatMessage(uint16 color, uint8 duration, const char *message, ...);
void UndrawChatMessage();

/* misc_gui.cpp */
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID color);
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID color);
void HideFillingPercent(TextEffectID te_id);

#endif /* TEXTEFF_HPP */