22 #ifndef GUI_SAVELOAD_DIALOG_H 23 #define GUI_SAVELOAD_DIALOG_H 25 #include "gui/dialog.h" 26 #include "gui/widgets/list.h" 28 #include "engines/metaengine.h" 32 #if defined(USE_CLOUD) && defined(USE_LIBCURL) 33 class SaveLoadChooserDialog;
35 class SaveLoadCloudSyncProgressDialog :
public Dialog {
36 StaticTextWidget *_label, *_percentLabel;
37 SliderWidget *_progressBar;
38 SaveLoadChooserDialog *_parent;
43 SaveLoadCloudSyncProgressDialog(
bool canRunInBackground, SaveLoadChooserDialog *parent);
44 ~SaveLoadCloudSyncProgressDialog()
override;
46 void handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
override;
47 void handleTickle()
override;
54 #define kSwitchSaveLoadDialog -2 60 #ifdef DISABLE_FANCY_THEMES 61 #define DISABLE_SAVELOADCHOOSER_GRID 62 #endif // DISABLE_FANCY_THEMES 64 #ifndef DISABLE_SAVELOADCHOOSER_GRID 65 enum SaveLoadChooserType {
66 kSaveLoadDialogList = 0,
67 kSaveLoadDialogGrid = 1
70 SaveLoadChooserType getRequestedSaveLoadDialog(
const MetaEngine *metaEngine);
71 #endif // !DISABLE_SAVELOADCHOOSER_GRID 80 void close()
override;
82 void reflowLayout()
override;
84 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
86 #if defined(USE_CLOUD) && defined(USE_LIBCURL) 87 virtual void runSaveSync(
bool hasSavepathOverride);
90 void handleTickle()
override;
92 #ifndef DISABLE_SAVELOADCHOOSER_GRID 93 virtual SaveLoadChooserType getType()
const = 0;
94 #endif // !DISABLE_SAVELOADCHOOSER_GRID 100 virtual int runIntern() = 0;
103 virtual void updateSaveList();
113 virtual void listSaves();
117 const bool _saveMode;
120 bool _metaInfoSupport;
121 bool _thumbnailSupport;
122 bool _saveDateSupport;
123 bool _playTimeSupport;
125 bool _dialogWasShown;
129 #ifndef DISABLE_SAVELOADCHOOSER_GRID 133 void addChooserButtons();
135 #endif // !DISABLE_SAVELOADCHOOSER_GRID 137 #if defined(USE_CLOUD) && defined(USE_LIBCURL) 139 bool _didUpdateAfterSync;
144 friend class SaveLoadCloudSyncProgressDialog;
152 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
156 void reflowLayout()
override;
158 #ifndef DISABLE_SAVELOADCHOOSER_GRID 159 SaveLoadChooserType getType()
const override {
return kSaveLoadDialogList; }
160 #endif // !DISABLE_SAVELOADCHOOSER_GRID 162 void open()
override;
163 void close()
override;
165 void updateSaveList()
override;
167 int runIntern()
override;
179 void addThumbnailContainer();
180 void updateSelection(
bool redraw);
183 #ifndef DISABLE_SAVELOADCHOOSER_GRID 194 void setTargetSlot(
int slot) { _targetSlot = slot; }
196 void open()
override;
198 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
212 void open()
override;
214 void reflowLayout()
override;
216 SaveLoadChooserType getType()
const override {
return kSaveLoadDialogGrid; }
218 void close()
override;
220 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
221 void handleMouseWheel(
int x,
int y,
int direction)
override;
222 void updateSaveList()
override;
224 int runIntern()
override;
226 uint _columns, _lines;
227 uint _entriesPerPage;
237 int _nextFreeSaveSlot;
240 bool selectDescription();
243 SlotButton() : container(
nullptr), button(
nullptr), description(
nullptr) {}
250 void setVisible(
bool state) {
251 container->setVisible(state);
255 ButtonArray _buttons;
256 void destroyButtons();
261 #endif // !DISABLE_SAVELOADCHOOSER_GRID
Definition: saveload-dialog.h:73
Definition: saveload-dialog.h:205
Definition: edittext.h:32
Definition: saveload-dialog.h:187
Definition: saveload-dialog.h:148