src/texteff.hpp
author glx
Wed, 07 May 2008 14:12:20 +0000
changeset 9131 d7da7ac0f845
parent 9111 48ce04029fe4
child 9898 75347c78b276
permissions -rw-r--r--
(svn r12991) -Codechange: removed some unneeded includes
6998
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
     1
/* $Id$ */
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
     2
9111
48ce04029fe4 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents: 8773
diff changeset
     3
/** @file texteff.hpp Functions related to text effects. */
48ce04029fe4 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents: 8773
diff changeset
     4
6998
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
     5
#ifndef TEXTEFF_HPP
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
     6
#define TEXTEFF_HPP
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
     7
8773
1fabd174dbc8 (svn r12472) -Codechange: remove unneeded declaration of ViewPort and DrawPixelInfo.
rubidium
parents: 7454
diff changeset
     8
#include "gfx_type.h"
1fabd174dbc8 (svn r12472) -Codechange: remove unneeded declaration of ViewPort and DrawPixelInfo.
rubidium
parents: 7454
diff changeset
     9
6998
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    10
/**
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    11
 * Text effect modes.
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    12
 */
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    13
enum TextEffectMode {
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    14
	TE_RISING, ///< Make the text effect slowly go upwards
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    15
	TE_STATIC, ///< Keep the text effect static
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    16
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    17
	INVALID_TE_ID = 0xFFFF,
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    18
};
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    19
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    20
typedef uint16 TextEffectID;
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    21
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    22
void MoveAllTextEffects();
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    23
TextEffectID AddTextEffect(StringID msg, int x, int y, uint16 duration, TextEffectMode mode);
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    24
void InitTextEffects();
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    25
void DrawTextEffects(DrawPixelInfo *dpi);
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    26
void UpdateTextEffect(TextEffectID effect_id, StringID msg);
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    27
void RemoveTextEffect(TextEffectID effect_id);
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    28
7454
e55eea8c05c7 (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
rubidium
parents: 7014
diff changeset
    29
void InitChatMessage();
e55eea8c05c7 (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
rubidium
parents: 7014
diff changeset
    30
void DrawChatMessage();
e55eea8c05c7 (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
rubidium
parents: 7014
diff changeset
    31
void CDECL AddChatMessage(uint16 color, uint8 duration, const char *message, ...);
e55eea8c05c7 (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
rubidium
parents: 7014
diff changeset
    32
void UndrawChatMessage();
6998
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    33
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    34
/* misc_gui.cpp */
7014
533521754123 (svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
truelight
parents: 6998
diff changeset
    35
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID color);
533521754123 (svn r10270) -Add: prefixed the loading indicator with an arrow, up meaning vehicle is loading, down meaning vehicle is unloading
truelight
parents: 6998
diff changeset
    36
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID color);
6998
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    37
void HideFillingPercent(TextEffectID te_id);
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    38
39e783d3816c (svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight
parents:
diff changeset
    39
#endif /* TEXTEFF_HPP */