1 /* ScummVM - Graphic Adventure Engine
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.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #ifndef GUI_SAVELOAD_DIALOG_H
26 #define GUI_SAVELOAD_DIALOG_H
28 #include "gui/dialog.h"
29 #include "engines/metaengine.h"
36 class SaveLoadChooser
: public GUI::Dialog
{
37 typedef Common::String String
;
38 typedef Common::StringList StringList
;
40 GUI::ListWidget
*_list
;
41 GUI::ButtonWidget
*_chooseButton
;
42 GUI::ButtonWidget
*_deleteButton
;
43 GUI::GraphicsWidget
*_gfxWidget
;
44 GUI::ContainerWidget
*_container
;
45 GUI::StaticTextWidget
*_date
;
46 GUI::StaticTextWidget
*_time
;
47 GUI::StaticTextWidget
*_playtime
;
49 const EnginePlugin
*_plugin
;
51 bool _metaInfoSupport
;
52 bool _thumbnailSupport
;
53 bool _saveDateSupport
;
54 bool _playTimeSupport
;
56 SaveStateList _saveList
;
59 uint8 _fillR
, _fillG
, _fillB
;
61 void updateSaveList();
62 void updateSelection(bool redraw
);
64 SaveLoadChooser(const String
&title
, const String
&buttonLabel
);
67 virtual void handleCommand(GUI::CommandSender
*sender
, uint32 cmd
, uint32 data
);
68 void setList(const StringList
& list
);
69 int runModal(const EnginePlugin
*plugin
, const String
&target
);
72 const Common::String
&getResultString() const;
73 void setSaveMode(bool saveMode
);
75 virtual void reflowLayout();
80 } // End of namespace GUI