ScummVM API documentation
dialogue_render.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 HARVESTER_DIALOGUE_RENDER_H
23#define HARVESTER_DIALOGUE_RENDER_H
24
25#include "common/array.h"
26#include "common/rect.h"
27#include "common/str.h"
28
29namespace Graphics {
30class Font;
31class Screen;
32}
33
34namespace Harvester {
35namespace DialogueRendering {
36
37static const int kDialogueSubtitleTextWidth = 316;
38static const int kDialogueTextEntryMaxWidth = 550;
39static const int kDialogueKeywordTextY = 34;
40static const int kDialogueTopicStartX = 168;
41static const int kDialogueTopicEndX = 482;
42static const int kDialogueOtherStartY = 170;
43static const int kDialogueOtherEndY = 193;
44
45int getDialogueTextLineHeight(const Graphics::Font &font);
46int resolveDialogueTextboxIndex(uint lineCount);
47int resolveDialogueResponseTextboxIndex(uint responseRowCount);
48void drawDialogueTextLines(Graphics::Screen &screen, const Graphics::Font &font,
49 const Common::Array<Common::String> &lines, int x, int y, int width);
50void wrapDialogueTextLikeNative(const Graphics::Font &font, bool usesCft,
51 const Common::String &text, int width, Common::Array<Common::String> &lines);
52int getDialogueMenuItemAt(const Graphics::Font &font, uint itemCount, const Common::Point &mousePos);
53bool isDialogueOtherHit(const Common::Point &mousePos);
54
55} // End of namespace DialogueRendering
56} // End of namespace Harvester
57
58#endif // HARVESTER_DIALOGUE_RENDER_H
Definition: str.h:59
Definition: font.h:83
Definition: screen.h:47
Definition: formatinfo.h:28
Definition: rect.h:144
Definition: atari-screen.h:58