src/texteff.hpp
author rubidium
Wed, 09 Jul 2008 19:30:44 +0000
branch0.6
changeset 11131 d8136dad6b1c
parent 7950 3d3ed007127a
child 9269 742671e649bb
permissions -rw-r--r--
(svn r13689) [0.6] -Backport from trunk:
- Fix: Server crashing when banning the rconning client (r13661)
- Fix: Incorrect usage of strtoul (r13508)
- Fix: Crash when one tries to raise the nothern corner of MP_VOID tiles (i.e. the southern corner of the tiles on the southern map edge) in the scenario editor [FS#2106] (r13624)
- Fix: Division by zero when one would press 'd' (skip order) when there's no order (r13409)
/* $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 */