ScummVM API documentation
dialog.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 ULTIMA_ULTIMA1_U1DIALOGS_DIALOG_H
23#define ULTIMA_ULTIMA1_U1DIALOGS_DIALOG_H
24
25#include "ultima/shared/gfx/popup.h"
26#include "ultima/shared/gfx/character_input.h"
27#include "ultima/shared/core/str.h"
28
29namespace Ultima {
30namespace Ultima1 {
31
32class Ultima1Game;
33namespace Maps {
34 class Ultima1Map;
35}
36
37namespace U1Dialogs {
38
42class Dialog : public Shared::Gfx::Popup {
43protected:
44 Ultima1Game *_game;
45 Common::String _prompt;
46protected:
50 Ultima1Game *getGame() { return _game; }
51
56
63 void addInfoMsg(const Common::String &text, bool newLine = true, bool replaceLine = false);
64
69
73 void getInput(bool isNumeric = true, size_t maxCharacters = 4);
74
78 void centerText(const Common::String &line, int yp);
79
83 void centerText(const Shared::StringArray &lines, int yp);
84public:
89
93 void draw() override;
94
98 void hide() override;
99};
100
101} // End of namespace U1Dialogs
102} // End of namespace Ultima1
103} // End of namespace Ultima
104
105#endif
Definition: str.h:59
Definition: popup.h:38
Definition: dialog.h:42
void addInfoMsg(const Common::String &text, bool newLine=true, bool replaceLine=false)
void centerText(const Shared::StringArray &lines, int yp)
void centerText(const Common::String &line, int yp)
void getInput(bool isNumeric=true, size_t maxCharacters=4)
Ultima1Game * getGame()
Definition: dialog.h:50
Definition: game.h:42