ScummVM API documentation
screentext.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ILLUSIONS_SCREENTEXT_H
23#define ILLUSIONS_SCREENTEXT_H
24
25#include "illusions/graphics.h"
26#include "common/list.h"
27#include "common/rect.h"
28#include "graphics/surface.h"
29
30namespace Illusions {
31
32#define TEXT_FLAG_LEFT_ALIGN 1
33#define TEXT_FLAG_CENTER_ALIGN 2
34#define TEXT_FLAG_RIGHT_ALIGN 4
35#define TEXT_FLAG_BORDER_DECORATION 24
36
37class IllusionsEngine;
38class FontResource;
39
41 Common::Point _position;
42 WidthHeight _dimensions;
43 Common::Point _offsPt;
44 uint32 _fontId;
45 uint16 _backgroundColor;
46 uint16 _borderColor;
47 byte _colorR, _colorG, _colorB;
48 uint _flags;
49};
50
52 ScreenTextInfo _info;
53 uint16 _text[1024];
54};
55
57public:
60 void getTextInfoDimensions(WidthHeight &textInfoDimensions);
61 void getTextInfoPosition(Common::Point &position);
62 void setTextInfoPosition(Common::Point position);
63 void updateTextInfoPosition(Common::Point position);
64 void clipTextInfoPosition(Common::Point &position);
65 bool refreshScreenText(FontResource *font, WidthHeight dimensions, Common::Point offsPt,
66 uint16 *text, uint textFlags, uint16 backgroundColor, uint16 borderColor, uint16 *&outTextPtr);
67 bool insertText(uint16 *text, uint32 fontId, WidthHeight dimensions, Common::Point offsPt, uint flags,
68 uint16 backgroundColor, uint16 borderColor, byte colorR, byte colorG, byte colorB, uint16 *&outTextPtr);
69 void removeText();
70 void clearText();
71public:
72 IllusionsEngine *_vm;
73 Common::Point _position;
74 WidthHeight _dimensions;
75 Graphics::Surface *_surface;
77 void freeTextSurface();
78};
79
80} // End of namespace Illusions
81
82#endif // ILLUSIONS_SCREENTEXT_H
Definition: list.h:44
Definition: fontresource.h:60
Definition: illusions.h:92
Definition: screentext.h:56
Definition: rect.h:144
Definition: surface.h:67
Definition: screentext.h:51
Definition: screentext.h:40
Definition: graphics.h:31