ScummVM API documentation
continue_save_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 TITANIC_CONTINUE_SAVE_DIALOG_H
23#define TITANIC_CONTINUE_SAVE_DIALOG_H
24
25#include "common/array.h"
26#include "titanic/events.h"
27#include "titanic/support/image.h"
28#include "titanic/support/rect.h"
29#include "titanic/support/string.h"
30#include "titanic/gfx/text_control.h"
31
32namespace Titanic {
33
34#define EXIT_GAME -2
35
37 struct SaveEntry {
38 int _slot;
39 CString _name;
40 SaveEntry() : _slot(0) {}
41 SaveEntry(int slot, const CString &name) : _slot(slot), _name(name) {}
42 };
43private:
45 CTextControl _slotNames[5];
46 int _highlightedSlot, _selectedSlot;
47 Point _mousePos;
48 bool _evilTwinShown;
49 bool _mouseDown;
50 int _restoreState, _startState;
51 Image _backdrop;
52 Image _evilTwin;
53 Image _restoreD, _restoreU, _restoreF;
54 Image _startD, _startU, _startF;
55private:
59 void loadImages();
60
64 void render();
65
69 void renderButtons();
70
74 void renderSlots();
75
79 Rect getSlotBounds(int index);
80public:
82 ~CContinueSaveDialog() override;
83
84 void mouseMove(const Point &mousePos) override;
85 void leftButtonDown(const Point &mousePos) override;
86 void leftButtonUp(const Point &mousePos) override;
87 void actionStart(Common::CustomEventType action) override;
88
92 void addSavegame(int slot, const CString &name);
93
97 int show();
98};
99
100} // End of namespace Titanic
101
102#endif /* TITANIC_CONTINUE_SAVE_DIALOG_H */
Definition: continue_save_dialog.h:36
void addSavegame(int slot, const CString &name)
void mouseMove(const Point &mousePos) override
Definition: events.h:46
Definition: string.h:40
Definition: text_control.h:35
Definition: image.h:31
Definition: rect.h:35
uint32 CustomEventType
Definition: events.h:212
Definition: rect.h:144