From 49fafb48a7f089c97ed3baa9aefe65ec56dce682 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 05:04:59 +0200 Subject: GUI: Refactor default savegame description creation. Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP. Now I added a method to SaveLoadChooser instead, which takes care of this. This might not be the best placement of such a functionality, thus I added a TODO which talks about moving it to a better place. --- gui/saveload.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index dc0f0429c7..e81b10d214 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -79,6 +79,21 @@ public: const Common::String &getResultString() const; + /** + * Creates a default save description for the specified slot. Depending + * on the ScummVM configuration this might be a simple "Slot #" description + * or the current date and time. + * + * TODO: This might not be the best place to put this, since engines not + * using this class might want to mimic the same behavior. Check whether + * moving this to a better place makes sense and find what this place would + * be. + * + * @param slot The slot number (must be >= 0). + * @return The slot description. + */ + Common::String createDefaultSaveDescription(const int slot) const; + virtual void reflowLayout(); virtual void close(); -- cgit v1.2.3