Commit Graph

56 Commits

Author SHA1 Message Date
Alexander Tkachev
b665fc933d ALL: Make simpleSaveNames() a MetaEngineFeature
Added it into hasFeature() of all engines which returned `true` in
simpleSaveNames() before.

As mentioned in #788, SCI is not always using simple names, so it
doesn't have such feature now.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
53aa0c46f1 GUI: JANITORIAL: Fix code formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3da38ca60b CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
81c85b6651 CLOUD: Fix SaveLoadDialogs to check USE_CLOUD
Linking was failing when disabling curl support.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
659dcd9702 GUI: Fix SaveLoadDialog
It was SavesSyncRequest's target even when closed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
62a640ff44 GUI: Disable "Run in background" for "difficult" engines
During saves sync slots of MetaEngines with simpleSaveNames() == false
would not be available at all. User would have to wait for sync to
complete.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab1d160ec8 ALL: Add MetaEngine::simpleSaveNames()
Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f24a89e080 GUI: Fix SaveLoadCloudSyncProgressDialog
* disabled progress bar;
* removed syncTarget segfault;
* fixed grid slots disabling for "locked" slots.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f5cb5be393 GUI: Add SaveLoadCloudSyncProgress in ScummModern theme
ScummVM would probably crash when using a theme without
SaveLoadCloudSyncProgress dialog described.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
67789c3c16 GUI: Update SaveLoadCloudSyncProgressDialog
So now it's centered, includes a progress bar and two labels instead of
one. Works fine in 320x200.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f1a56eaf36 GUI: Show "locked" saves during sync 2016-08-24 16:07:55 +06:00
Alexander Tkachev
6c5a8f34ea CLOUD: Add SaveLoadCloudSyncProgress enum
It's common for Save/Load dialogs and SavesSyncRequest.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9eb4aad7fd CLOUD: Make DefaultSaveFileManager ignore syncing files
MetaEngines don't get "locked" files in the list, so won't try to open
these.

Save/Load dialog updates save list every time SavesSyncRequest tells it
to.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ce7be17d3 CLOUD: Make ProgressDialog display downloading progress 2016-08-24 16:07:55 +06:00
Alexander Tkachev
3db80154d6 CLOUD: Fix SaveLoadCloudSyncProgressDialog crash
It's closing itself a bit later now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e9721976aa GUI: Add SaveLoadCloudSyncProgressDialog
It's shown by SaveLoadChooserDialog when files are downloaded and some
save slots are locked. One can hide that dialog to interact with
non-locked slots or cancel saves sync completely. Dialog's label shows
current sync progress.

Dialog automatically hides itself when all files are downloaded.
WARNING: right now that results in a crash!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e7763700e2 CLOUD: Make Save/Load dialog start saves sync
It also shows a "sync disabled" icon in case it has a savepath override.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
b590cc2d8f GUI: Cleanup class initialization 2016-06-01 13:16:12 +02:00
Johannes Schickel
bbfff93c64 GUI: Do not overwrite write protected saves in grid based save dialog.
This fixes overwriting of, for example, autosaves in the grid based save load
dialog when using "New Save".
2014-12-29 14:59:13 +01:00
Ben Castricum
9d885bce22 GUI: s/savegame/saved game/
Makes it consistant throughout the GUI
2014-08-22 07:11:03 +02:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
6a1112f98f GUI: Mark some intentional fall throughs in switches.
All of these are for handling kCloseCmd.
2013-07-15 13:44:24 +02:00
Johannes Schickel
0052ef2802 GUI: Check for screen changes in the saveload chooser selection code. 2012-10-28 21:44:05 +01:00
Johannes Schickel
9942b5ab60 GUI: Support for page restoring for non-continuous save lists in the grid chooser. 2012-09-26 16:14:18 +02:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Johannes Schickel
40fb004509 GUI: Fix maximum page number calculation in grid chooser.
This avoids a off by one error in some cases.
2012-09-26 02:59:32 +02:00
Johannes Schickel
bc1743b225 GUI: Save/restore last scroll position in the list save/load dialog.
This should give a better user experience, since the user will not have to
scroll back to where he was when he used the dialog last.

Thanks to wjp for suggesting this.
2012-09-26 02:59:32 +02:00
Johannes Schickel
66fb399227 GUI: Save/restore the last used page in the grid save/load dialog.
This allows opening the dialog on (nearly) the same page again as when it was
closed. Sadly due to the different number of entries in the save and load
version this is not always exactly the same page as before. Same goes for
resolution changes.

Thanks to wjp for suggesting this.
2012-09-26 02:59:31 +02:00
Alyssa Milburn
c9f3d83c9e GUI: Fix out-of-bounds in new chooser. 2012-08-14 23:48:24 +02:00
Johannes Schickel
9ba145419f GUI: Mark parts of the grid based chooser layout code as HACK. 2012-08-12 15:16:27 +02:00
Johannes Schickel
e7cd238809 GUI: Remove left-over code from theme based fill color in thumbnail display. 2012-08-12 14:56:20 +02:00
Johannes Schickel
4f7c65af0e Merge pull request #260 from lordhoto/new-chooser.
New save/load chooser

Conflicts:
	gui/saveload.cpp
2012-08-12 14:49:28 +02:00
Johannes Schickel
71daae7bbc GUI: Use "OK" instead of "Ok" in SavenameDialog. 2012-07-25 17:21:36 +02:00
Johannes Schickel
7d51907405 GUI: Add possibility to disable the grid based chooser via DISABLE_SAVELOADCHOOSER_GRID. 2012-07-24 23:49:50 +02:00
Johannes Schickel
ca225cc7e0 GUI: Strip a trailing whitespace. 2012-07-24 23:34:35 +02:00
Johannes Schickel
bab992ab98 GUI: Remove unecessary explicit GUI namespace uses. 2012-07-24 23:27:59 +02:00
Johannes Schickel
8e791896b8 GUI: Remove an unnecessary empty line. 2012-07-24 23:26:47 +02:00
Johannes Schickel
91196e5375 GUI: Also disable the switch-to-list button in the choosers, when the grid one isn't available. 2012-07-24 23:25:10 +02:00
Johannes Schickel
89b638128f GUI: Rename LoadChooserThumbnailed to SaveLoadChooserGrid. 2012-07-24 23:24:17 +02:00
Johannes Schickel
90eb773c5d GUI: Implement saving in the grid based save/load chooser. 2012-07-24 23:23:06 +02:00
Johannes Schickel
e37c0be0d9 GUI: Fix missing button background in grid based chooser.
Now the thumbnail button and the descriptions are sub widgets of the
container widget.
2012-07-09 02:19:58 +02:00
Johannes Schickel
049e61b445 GUI: Fix small memory leak in grid based load chooser. 2012-07-01 17:17:04 +02:00
Johannes Schickel
3256081b2b GUI: Add page display to grid based load chooser. 2012-07-01 16:49:07 +02:00
Johannes Schickel
bd3d5fb8ff GUI: Clean up save load chooser selection code. 2012-07-01 16:49:07 +02:00
Johannes Schickel
236db5ed87 GUI: Automatically switch to list based save/load chooser when changing resolution below 640x400. 2012-07-01 16:49:07 +02:00
Johannes Schickel
10bfb82d3b GUI: Use a slightly bigger vertical spacing in the thumbnail load chooser. 2012-06-29 16:16:36 +02:00
Johannes Schickel
c1426f783d GUI: Use a black rect when no thumbnail is available in the thumbnail load chooser. 2012-06-29 16:16:28 +02:00
Johannes Schickel
37fd9b7384 GUI: Fix memory leaks in LoadChooserThumbnailed::destroyButtons.
GuiObject::removeWidget only removes the widget from the widget list, but
doesn't delete it. Oops.
2012-06-29 15:55:46 +02:00
Johannes Schickel
d3e5763276 GUI: Allow the user to switch between list and thumbnail based load chooser. 2012-06-29 15:52:56 +02:00