ScummVM API documentation
pet_load_save.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_PET_LOAD_SAVE_H
23
#define TITANIC_PET_LOAD_SAVE_H
24
25
#include "titanic/pet_control/pet_glyphs.h"
26
#include "titanic/gfx/text_control.h"
27
28
namespace
Titanic
{
29
30
#define SAVEGAME_SLOTS_COUNT 5
31
32
class
CPetLoadSave
:
public
CPetGlyph
{
33
private
:
37
Rect
getSlotBounds(
int
index);
38
42
void
highlightChange();
43
47
bool
checkSlotsHighlight(
const
Point
&pt);
48
52
bool
isSlotHighlighted(
int
index,
const
Point
&pt);
53
protected
:
54
CTextControl
_slotNames[SAVEGAME_SLOTS_COUNT];
55
bool
_slotInUse[SAVEGAME_SLOTS_COUNT];
56
CPetGfxElement
_btnLoadSave;
57
CPetGfxElement
_gutter;
58
static
int
_savegameSlotNum;
59
protected
:
63
void
resetSlots
();
64
68
void
highlightSlot
(
int
index);
69
public
:
73
bool
setup
(
CPetControl
*petControl,
CPetGlyphs
*owner)
override
;
74
78
bool
reset
()
override
;
79
83
void
draw2
(
CScreenManager
*screenManager)
override
;
84
88
bool
MouseButtonDownMsg
(
const
Point
&pt)
override
;
89
93
bool
KeyCharMsg
(
int
key)
override
;
94
98
virtual
void
resetSaves
() {
resetSlots
(); }
99
103
virtual
void
highlightSave
(
int
index) = 0;
104
108
virtual
void
unhighlightSave
(
int
index) = 0;
109
113
virtual
void
execute
() = 0;
114
};
115
116
}
// End of namespace Titanic
117
118
#endif
Titanic::CPetLoadSave::unhighlightSave
virtual void unhighlightSave(int index)=0
Titanic::CPetLoadSave::draw2
void draw2(CScreenManager *screenManager) override
Titanic::CPetLoadSave
Definition:
pet_load_save.h:32
Titanic::CTextControl
Definition:
text_control.h:35
Titanic::CPetLoadSave::setup
bool setup(CPetControl *petControl, CPetGlyphs *owner) override
Titanic::CPetLoadSave::highlightSave
virtual void highlightSave(int index)=0
Titanic::CPetLoadSave::resetSaves
virtual void resetSaves()
Definition:
pet_load_save.h:98
Titanic::CPetLoadSave::highlightSlot
void highlightSlot(int index)
Titanic::CPetLoadSave::resetSlots
void resetSlots()
Titanic::CScreenManager
Definition:
screen_manager.h:49
Titanic::CPetGfxElement
Definition:
pet_gfx_element.h:29
Titanic::CPetLoadSave::reset
bool reset() override
Titanic::CPetLoadSave::MouseButtonDownMsg
bool MouseButtonDownMsg(const Point &pt) override
Titanic::CPetGlyph
Definition:
pet_glyphs.h:53
Titanic::CPetLoadSave::KeyCharMsg
bool KeyCharMsg(int key) override
Titanic::Rect
Definition:
rect.h:35
Common::Point
Definition:
rect.h:45
Titanic
Definition:
arm.h:30
Titanic::CPetGlyphs
Definition:
pet_glyphs.h:244
Titanic::CPetLoadSave::execute
virtual void execute()=0
Titanic::CPetControl
Definition:
pet_control.h:45
engines
titanic
pet_control
pet_load_save.h
Generated on Mon Dec 23 2024 09:20:23 for ScummVM API documentation by
1.8.13