Mercurial > hg > openttd
annotate src/texteff.hpp @ 17564:d5ff867052a5 draft
(svn r22328) -Add: a flag to GroundVehicles to disable insertion and removal of automatic orders until the next real order is reached.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 16 Apr 2011 16:45:35 +0000 |
parents | 9efba2c3774d |
children | 579bc020cf63 |
rev | line source |
---|---|
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
2 |
12778
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
3 /* |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
4 * This file is part of OpenTTD. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
5 * 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. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
6 * 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. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
7 * 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/>. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
8 */ |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11085
diff
changeset
|
9 |
9111
d48433370037
(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 <rubidium@openttd.org>
parents:
8773
diff
changeset
|
10 /** @file texteff.hpp Functions related to text effects. */ |
d48433370037
(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 <rubidium@openttd.org>
parents:
8773
diff
changeset
|
11 |
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
12 #ifndef TEXTEFF_HPP |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
13 #define TEXTEFF_HPP |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
14 |
17275
9efba2c3774d
(svn r22015) -Codechange: move yet another pair of methods from functions.h
rubidium <rubidium@openttd.org>
parents:
14258
diff
changeset
|
15 #include "economy_type.h" |
8773
fb8b9c0b7cd3
(svn r12472) -Codechange: remove unneeded declaration of ViewPort and DrawPixelInfo.
rubidium <rubidium@openttd.org>
parents:
7454
diff
changeset
|
16 #include "gfx_type.h" |
14258
a899d4e5ee1a
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
rubidium <rubidium@openttd.org>
parents:
14089
diff
changeset
|
17 #include "strings_type.h" |
8773
fb8b9c0b7cd3
(svn r12472) -Codechange: remove unneeded declaration of ViewPort and DrawPixelInfo.
rubidium <rubidium@openttd.org>
parents:
7454
diff
changeset
|
18 |
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
19 /** |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
20 * Text effect modes. |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
21 */ |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
22 enum TextEffectMode { |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
23 TE_RISING, ///< Make the text effect slowly go upwards |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
24 TE_STATIC, ///< Keep the text effect static |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
25 |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
26 INVALID_TE_ID = 0xFFFF, |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
27 }; |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
28 |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
29 typedef uint16 TextEffectID; |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
30 |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
31 void MoveAllTextEffects(); |
14089
511acd6d8554
(svn r18636) -Codechange: make TextEffect::duration a value in ticks instead of ticks * 8
smatz <smatz@openttd.org>
parents:
12778
diff
changeset
|
32 TextEffectID AddTextEffect(StringID msg, int x, int y, uint8 duration, TextEffectMode mode); |
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
33 void InitTextEffects(); |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
34 void DrawTextEffects(DrawPixelInfo *dpi); |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
35 void UpdateTextEffect(TextEffectID effect_id, StringID msg); |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
36 void RemoveTextEffect(TextEffectID effect_id); |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
37 |
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
38 /* misc_gui.cpp */ |
11085
8da1855e9f14
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
rubidium <rubidium@openttd.org>
parents:
10176
diff
changeset
|
39 TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID colour); |
8da1855e9f14
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
rubidium <rubidium@openttd.org>
parents:
10176
diff
changeset
|
40 void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID colour); |
10176
71daf486081d
(svn r14371) -Fix [FS#2313]: loading indicator didn't stay with the front engine when turning a train in a station.
rubidium <rubidium@openttd.org>
parents:
9898
diff
changeset
|
41 void HideFillingPercent(TextEffectID *te_id); |
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
42 |
17275
9efba2c3774d
(svn r22015) -Codechange: move yet another pair of methods from functions.h
rubidium <rubidium@openttd.org>
parents:
14258
diff
changeset
|
43 void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost); |
9efba2c3774d
(svn r22015) -Codechange: move yet another pair of methods from functions.h
rubidium <rubidium@openttd.org>
parents:
14258
diff
changeset
|
44 void ShowFeederIncomeAnimation(int x, int y, int z, Money cost); |
9efba2c3774d
(svn r22015) -Codechange: move yet another pair of methods from functions.h
rubidium <rubidium@openttd.org>
parents:
14258
diff
changeset
|
45 |
6998
13ea0d5f8acf
(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)
truelight <truelight@openttd.org>
parents:
diff
changeset
|
46 #endif /* TEXTEFF_HPP */ |