ScummVM API documentation
menuoptions.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 TWINE_MENUOPTIONS_H
23#define TWINE_MENUOPTIONS_H
24
25#include "common/rect.h"
26#define ONSCREENKEYBOARD_WIDTH 14
27#define ONSCREENKEYBOARD_HEIGHT 5
28
29#include "common/scummsys.h"
30#include "twine/scene/actor.h"
31
32namespace TwinE {
33
35private:
36 TwinEEngine *_engine;
37
38 uint8 _onScreenKeyboardDirty[ONSCREENKEYBOARD_WIDTH * ONSCREENKEYBOARD_HEIGHT] { 0 };
39
40 int _onScreenKeyboardX = 0;
41 int _onScreenKeyboardY = 0;
42 bool _onScreenKeyboardLeaveViaOkButton = false;
43
44 void setOnScreenKeyboard(int x, int y);
45
46 bool enterText(TextId textIdx, char *textTargetBuf, size_t bufSize);
47 void drawSelectableCharacters();
48 void drawInputText(int32 centerx, int32 top, int32 type, const char *text);
49 void drawSelectableCharacter(int32 x, int32 y);
50 int chooseSave(TextId textIdx, bool showEmptySlots = false);
51
52public:
53 MenuOptions(TwinEEngine *engine) : _engine(engine) {}
54
55 void showEndSequence();
56 void showCredits();
57 bool flagCredits = false;
58
59 char _saveGameName[32] {'\0'};
60
63 void newGame();
64
67 bool saveGameMenu();
68 bool deleteSaveMenu();
69};
70
71} // namespace TwinE
72
73#endif
Definition: menuoptions.h:34
Definition: twine.h:207