Commit Graph

61 Commits

Author SHA1 Message Date
aryanrawlani28
71a820caff ENGINES: Begin class renaming of ME & AME
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
c48719404a BASE: PLUGINS: Rename plugin matching helpers
- give*From* -> get*From*
2020-10-03 14:56:36 +02:00
aryanrawlani28
73cc973ad7 BASE: ENGINES: Change saveload code to adapt to the new MEC class.
- MEC: MetaEngineConnect.
- How do games handle save/load if MetaEngine (detection) is seperate from MetaEngineConnect (engine factory)?

- Most of the changes are quite similiar. ConfMan finds us the relevant MetaEngine, then simply use the new helpers from PluginMan.
- The new helpers will help convert a relevant MetaEngine into the other format or vice versa.
- Once the matching is complete, simply invoke functions by:
plugin->get<MetaEngineConnect>().engineMethod();
- Refer to previous commits to see the new class changes & notes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
f72a98c799 GUI: Return Strings from createDefaultSaveDesc 2020-08-30 14:43:41 +02:00
aryanrawlani28
5f2af6b93e GUI: U32: Add u32 support to Editables and Dialogs
- Editable widgets
- Lists
- SaveLoad Dialogs
- Browser Dialogs
2020-08-30 14:43:41 +02:00
Eugene Sandulenko
6fcc39810e GUI: Added sanity check 2020-04-27 14:04:04 +02:00
Bastien Bouclet
6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
bb813719b5 ENGINES: Change targets to have an 'engine ID'
The engine ID identifies which engine should be used to launch the target.
Also remove the 'single ID' system. Different games from engines that used
that system now have different game IDs.

Also-By: Matthew Hoops <clone2727@gmail.com>
2019-11-03 11:43:00 +01:00
D G Turner
30c366ee5d GUI: Add Missing Switch Default Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-03 06:03:46 +01:00
Colin Snover
d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
Tarek Soliman
231c263f70 GUI: Use dashes in default save description
Closes gh-956
2017-06-09 13:16:46 -05:00
Eugene Sandulenko
e8b70a4686 ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02: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
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
Ori Avtalion
253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01: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
f006eddac5 GUI: Let SaveLoadChooser::getResultString return a const reference. 2012-07-24 23:32:17 +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
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
1c389e5510 GUI: Only use grid load dialog for 640x400 or bigger.
Formerly it was enabled for everything above 320x200, but resolutions below
640x400 feature not enough space.
2012-07-01 15:43:20 +02:00
Johannes Schickel
e2056bdfd9 GUI: Remember last save/load chooser selection. 2012-06-29 16:09:59 +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
Johannes Schickel
72ea449431 GUI: Hook up the new load chooser for > 320x200 and engines which support thumbnails. 2012-06-15 23:03:18 +02:00
Johannes Schickel
1aa5200bb8 GUI: Create an interface for save/load dialogs. 2012-06-15 23:03:02 +02:00
Johannes Schickel
e866dfd406 GUI: Refactor engine plugin access out of SaveLoadChooserImpl into SaveLoadChooser. 2012-06-14 03:13:49 +02:00
Johannes Schickel
27b8b7e9b6 GUI: Hide save/load chooser implementation. 2012-06-14 03:01:11 +02:00
Johannes Schickel
49fafb48a7 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.
2012-06-10 05:04:59 +02:00
Johannes Schickel
7c5cf1b400 GUI: Add helper to SaveLoadChooser, which uses the currently active target.
This reduces the code duplication in all client code, which formerly duplicated
the querying of the plugin, game id etc. and now simply calls the newly added
method runModalWithCurrentTarget() on a SaveLoadChooser object.
2012-06-10 04:53:17 +02:00
Johannes Schickel
15046a7529 GUI: Get rid of SaveLoadChooser::setSaveMode.
We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
2012-06-10 04:19:45 +02:00
Johannes Schickel
3a196478c6 ALL: Reduce assignment of "" to Common::String.
When clearing an existant object clear() should be used.

When constructing objects (or using default values for parameters) the
constructor of String without any argument should be used.

This changes only a few instances I noticed while looking over some recent
commit logs.
2011-10-23 20:04:03 +02:00
Filippos Karapetis
d01d228ee8 AGI/COMMON: Fixed bug #3407308 - "AGI: SQ2: Saving allowed in autosave slot 0 from scummvmmenu"
The save/load dialog code was not polling for meta info for empty slots
2011-09-25 15:03:02 +03:00
Johannes Schickel
09501be85b ENGINES: Clean up SaveStateDescriptor.
Now SaveStateDescriptor no longer subclasses HashMap. Instead all possible
saved meta data is included directly into SaveStateDescriptor.

This is slightly less flexible, but we never needed that flexibility so far.
On the other hand it should reduce the memory usage. At least on my system
(Linux/amd64) the old SaveStateDescriptor had a size of 928 and the new
SaveStateDescriptor has a size of 200.
2011-07-02 21:07:55 +02:00
Max Horn
a4610df482 Merge branch 'branch-1-3-0' into master
I manually resolved all conflicts, and inspected every single change.
Many were due to the version string mismatch and thus easily resolved.
The MSVC project files add in the 1-3-0 branch were not merged,
neither where the changes to gui/themes/translations.dat.

Conflicts:
	NEWS
	backends/base-backend.cpp
	backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
	backends/module.mk
	backends/platform/ds/arm9/makefile
	backends/platform/psp/README.PSP
	backends/platform/samsungtv/main.cpp
	backends/platform/samsungtv/samsungtv.cpp
	backends/saves/posix/posix-saves.cpp
	base/commandLine.cpp
	base/internal_version.h
	base/main.cpp
	common/array.h
	configure
	devtools/create_project/create_project.cpp
	dists/android/AndroidManifest.xml
	dists/android/plugin-manifest.xml
	dists/iphone/Info.plist
	dists/irix/scummvm.spec
	dists/macosx/Info.plist
	dists/redhat/scummvm-tools.spec
	dists/redhat/scummvm.spec
	dists/scummvm.rc
	dists/slackware/scummvm.SlackBuild
	dists/wii/meta.xml
	engines/sci/parser/vocabulary.cpp
	engines/tinsel/handle.cpp
	gui/themes/translations.dat
2011-06-01 15:15:31 +02:00
agent-q
4076a0466d GUI/DS: Make 99 the maximum number of save slots displayed on the GMM load/save screens on the DS port. 2011-05-21 15:56:42 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
41121be4d6 GUI: Rename SaveLoadChooser::runModal to runModalWithPluginAndTarget
This avoids hiding an overloaded virtual method, which in turn can
cause weird bugs (see also the next commit).

svn-id: r55815
2011-02-07 22:58:22 +00:00
Max Horn
5b735131ba GUI: Push down some header (inter)dependencies
svn-id: r54267
2010-11-16 10:29:31 +00:00
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
336cde4b61 Always use kThumbnailHeight2 (i.e. 120) for the height of the thumbnail widget.
This fixes the thumbnails for games with resolutions != n*200 in the launcher.

svn-id: r50640
2010-07-04 01:11:37 +00:00
Eugene Sandulenko
01f9006ee7 GUI: Implement tooltips. FR #2821513.
FR #2821513: "GUI: add tooltips".
Added tooltips for Add Game button, clear field buttons and couple
other.

Current problem: Only first call correctly restores text. I could
not find where restore information gets lost.

svn-id: r49774
2010-06-15 10:52:35 +00:00
Eugene Sandulenko
3fafa07ab0 GUI: Added in-place hotkeys for widgets.
Now it is possible to specify hotkeys in place for ButtonWidget
and CheckboxWidget (the only widgets with hotkeys now).

Use de-facto standard with putting hotkey between tildes (~).
Like '~O~pen'. The tildes gets stripped before after hotkey
is extracted.

This is done for giving translators possibility to specify
their own hotkeys.

Old hotkeys defined at widget instance creation are left for
leaving possibility to specify non-printable hotkeys such as
Common::ASCII_ESCAPE.

Translation files were updated respectively.

svn-id: r49766
2010-06-15 10:47:31 +00:00
Eugene Sandulenko
859212df25 Implement translation support for ScummVM GUI.
Based on patch #2903830: "Updated Translation Prototype" by alexbevi
which in turn is based on patch #1739965 by jvprat.

Currently it builds all translations right into ScummVM. Once the
feature will be accepted more widely, i.e. more translations will
pop up, it will be trivial to move translation strings to external
file.

Finished translation: Russian
Unfinished translation: Hungarian

Things which are nice to do:
 - Language code -> language mapping for more user friendness
 - Specifying fonts to be used with language
 - Updating of interface language without restart. It will require
   moving of much code to reflowLayout() methods for each dialog

The .po files must be in single byte encodings. I.e. no support
for Unicode.

svn-id: r49759
2010-06-15 10:44:51 +00:00
Max Horn
c934642bdb COMMON: Move typedef StringList from str.h to new header str-array.h
This removes the dependency on array.h from str.h.
Also, begun migration from the confusing type name "StringList" to
the more appropriate StringArray.

svn-id: r48282
2010-03-18 15:09:24 +00:00
Max Horn
b0e02675e7 Get rid of Common::String::emptyString, and also of some port specific hackery (getting rid of certain global C++ objs)
svn-id: r46781
2009-12-30 23:01:36 +00:00
Johannes Schickel
f898cd12e6 Implement automatic clearing of "Untitled Savestate" in edit mode of the SaveLoadChooser as requested in feature request #2834637 "GUI: Allow greying out dummy ListWidget entries".
svn-id: r43555
2009-08-20 10:04:21 +00:00