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
32
namespace
Titanic
{
33
34
#define EXIT_GAME -2
35
36
class
CContinueSaveDialog
:
public
CEventTarget
{
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
};
43
private
:
44
Common::Array<SaveEntry>
_saves;
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;
55
private
:
59
void
loadImages();
60
64
void
render();
65
69
void
renderButtons();
70
74
void
renderSlots();
75
79
Rect
getSlotBounds(
int
index);
80
public
:
81
CContinueSaveDialog
();
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
keyDown(
Common::KeyState
keyState)
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 */
Titanic::CTextControl
Definition:
text_control.h:35
Titanic::CContinueSaveDialog::show
int show()
Common::Array< SaveEntry >
Titanic::CContinueSaveDialog
Definition:
continue_save_dialog.h:36
Titanic::Rect
Definition:
rect.h:35
Common::Point
Definition:
rect.h:45
Titanic
Definition:
arm.h:30
Titanic::CString
Definition:
string.h:40
Titanic::CContinueSaveDialog::addSavegame
void addSavegame(int slot, const CString &name)
Common::KeyState
Definition:
keyboard.h:294
Image
Definition:
movie_decoder.h:32
Titanic::CEventTarget
Definition:
events.h:46
Titanic::CContinueSaveDialog::mouseMove
void mouseMove(const Point &mousePos) override
engines
titanic
continue_save_dialog.h
Generated on Sun Dec 22 2024 09:19:52 for ScummVM API documentation by
1.8.13