2007-06-21 16:17:47 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file texteff.hpp Functions related to text effects. */
|
|
|
|
|
2007-06-21 16:17:47 +00:00
|
|
|
#ifndef TEXTEFF_HPP
|
|
|
|
#define TEXTEFF_HPP
|
|
|
|
|
2011-02-07 22:22:20 +00:00
|
|
|
#include "economy_type.h"
|
2008-03-28 16:38:18 +00:00
|
|
|
#include "gfx_type.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "strings_type.h"
|
2008-03-28 16:38:18 +00:00
|
|
|
|
2007-06-21 16:17:47 +00:00
|
|
|
/**
|
|
|
|
* 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();
|
2009-12-25 23:22:41 +00:00
|
|
|
TextEffectID AddTextEffect(StringID msg, int x, int y, uint8 duration, TextEffectMode mode);
|
2007-06-21 16:17:47 +00:00
|
|
|
void InitTextEffects();
|
|
|
|
void DrawTextEffects(DrawPixelInfo *dpi);
|
|
|
|
void UpdateTextEffect(TextEffectID effect_id, StringID msg);
|
|
|
|
void RemoveTextEffect(TextEffectID effect_id);
|
|
|
|
|
|
|
|
/* misc_gui.cpp */
|
2009-02-09 02:57:15 +00:00
|
|
|
TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour);
|
|
|
|
void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour);
|
2008-09-21 18:28:35 +00:00
|
|
|
void HideFillingPercent(TextEffectID *te_id);
|
2007-06-21 16:17:47 +00:00
|
|
|
|
2011-02-07 22:22:20 +00:00
|
|
|
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
|
|
|
|
void ShowFeederIncomeAnimation(int x, int y, int z, Money cost);
|
|
|
|
|
2007-06-21 16:17:47 +00:00
|
|
|
#endif /* TEXTEFF_HPP */
|