Commit Graph

50 Commits

Author SHA1 Message Date
Thierry Crozat
67720ef658 JANITORIAL: Remove obselete references to MetaEngineConnect
At some point when splitting the MetaEngine to a detection
plugin and a static meta engine, the former was called
MetaEngine while the latter was called MetaEngineConnect.
Thus was then later change to MetaEngineDetection and
MetaEngine. But some references were left to the former
names in comments and documentation.
2021-02-14 14:32:36 +00:00
Cameron Cawley
11724f9df1 GUI: Add a tab for backend-specific options 2020-11-22 16:35:03 +00:00
Cameron Cawley
c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Torbjörn Andersson
9acdbe42af
GUI: Update "edit game" for new graphics options (#2512)
Make the new graphics options in "edit game" disabled until the user
asks to override the global settings. (Most of these were added during
the ScummVM/ResidualVM merger, I guess.)
2020-10-12 18:44:15 +02:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
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
81ba5d5627 ENGINES: ME & MEC: Allow MEC to build engine options widget.
- Rename the one in ME to avoid ambiguity.
- ME is named *static & MEC is named *dynamic.
- This change means that engines  can build 2 types of option widgets.
- The "Engine" tab is created statically regardless if an engine plugin is present or not.
- The in-game options are built using the MEC.
- With this commit, engines/dialogs is no longer dependant on MetaEngine, and instead used MEC all over.
2020-10-03 14:56:36 +02:00
aryanrawlani28
1616d7d515 ENGINES: ME & MEC: Move achievements-related code to MetaEngineConnect
- Adjust accordingly for dialogs.
2020-10-03 14:56:36 +02:00
aryanrawlani28
0cc8719417 BASE: ENGINES: Adapt to keymaps moving to engine plugins
- Also improvise usage of MetaEngineConnect in main.cpp a bit.
2020-10-03 14:56:36 +02:00
aryanrawlani28
68d01321d6 GUI: U32: Downscale changes of U32, fix review issues
This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
2020-08-30 14:43:41 +02:00
aryanrawlani28
d12c6c4338 GUI: U32: Code cleanup
- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp
2020-08-30 14:43:41 +02:00
aryanrawlani28
160a1320cc GUI: U32: Rename more temp code and fix issues
- Remove convertFromU32.. where necessary
- Replace convertFromU32 to .encode() for better readability
- Fix spacing issues in tabs
- Fix spacing issues in popups
- Fix weird font rendering in certain menus.
- Fix dialog changing sizes by huge amount when changing languages
- Some minor changes from String::format to U32String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28
96912f4adb GUI: U32: Rename some references of strings to use U32() & not helper method 2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
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
aryanrawlani28
aafade4507 GUI: U32: Shift most widgets to draw with u32
- ButtonWidgets (Button, Radio, Checkbox, dropdown)
- StaticTextWidgets
- PopUpWidgets
- Tabs
- Add a temporary overloaded drawDDText function to make other widgets draw normally
2020-08-30 14:43:41 +02:00
aryanrawlani28
7e27af8148 GUI: Code cleanup 2020-06-22 00:03:02 +02:00
aryanrawlani28
f3e4e3e009 GUI: Code & comment cleanup, fix review issues 2020-06-22 00:03:02 +02:00
aryanrawlani28
732e79b1cf GUI: RTL: Add disabled code for tab drawing 2020-06-22 00:03:02 +02:00
lolbot-iichan
c09abee01c GUI: Add GUI for per-game achievements tab 2020-04-29 10:31:36 +02:00
Bastien Bouclet
f7efd3cd7f GUI: Fix error when renaming a target in the edit game dialog
The OptionsContainerWidget keeps a copy of the name of the game domain
that needs to be updated when the target is renamed.

Ideally, OptionsContainerWidget would simply keep a pointer to the
ConfigurationManager::Domain object, however that's not currently
possible as the ConfigurationManager defaults are global instead of
being per domain. As a result they are not accessible from the Domain
object.

Fixes #11416.
2020-04-11 08:16:21 +02:00
Bastien Bouclet
bcfb7145fa GUI: Allow engines to define a fully custom tab in the edit game dialog
By implementing MetaEngine::buildEngineOptionsWidget, engines can
instantiate a container widget that will be shown in the Engine tab of
the edit game dialog. The default implementation retains the existing
behavior and shows the extra GUI options.
2020-03-28 07:38:39 +01:00
Cameron Cawley
7488e17c0a GUI: Allow shaders to be selected for individual targets 2020-03-09 18:01:14 -05:00
Bastien Bouclet
519b4a57e2 KEYMAPPER: Allow engines to return multiple keymaps
The idea is that keymaps may be situational. A keymap may be always
enabled, while another one may be enabled only during combat..
2020-01-29 08:51:29 +01:00
Bastien Bouclet
14663c4790 KEYMAPPER: Make the keymapper mandatory 2020-01-29 08:51:29 +01:00
Bastien Bouclet
511d138bbc KEYMAPPER: Move the remap dialog to an option dialog tab
The aim is to make it easy to discover, and possible to use without a
keyboard.
2020-01-26 23:09:08 +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
c566d02992 GUI: Add override markers where appropriate 2020-01-19 15:08:37 +01:00
Paul Gilbert
a18eae1067 GUI: Fix crash opening edit game dialog for games with no music 2020-01-09 18:37:19 -08:00
Bastien Bouclet
eb28c5a092 GUI: Use a dialog theme layout for the unknown game dialog 2020-01-04 10:56:25 +01:00
Bastien Bouclet
c0d8b6d9fc GUI: Introduce dynamic layouts
Prior to this change, a GUI layout was only affected by the screen size.
Now, a layout can additionally be influenced by the GUI dialog and widgets
that uses it. This capability is leveraged to implement the following
features:

* Layout elements that are not bound to a GUI widget do not take space.
   This means that dialogs where the widgets shown depend on for example
   a feature being enabled at configure time no longer have blank spaces.
* Widgets can define a minimal required size for their contents not to be
   cut. For now this is only used for buttons so their width is always
   sufficient for their caption not to be cut. This mechanism could be
   applied to other widget types in the future.
2020-01-04 10:56:25 +01:00
Bastien Bouclet
9454346782 ENGINES: Copy the data referenced by QualifiedGameDescriptor
The engineId, gameId and description come from static data in the game
engines. When the game engines are compiled as dynamic plugins, the QGD
structure may outlive the engine plugin. Making a copy ensures the data
remains available.

Fixes #11292.
2020-01-01 08:19:48 +01:00
Henrik "Henke37" Andersson
b469747f7a GUI: Don't show midi setting tabs if the game has no music at all. 2019-12-07 21:14:44 +02:00
Bastien Bouclet
c142838122 BASE: Change the command line interface to use engine-qualified game names
Qualified game names have the following form: engineId:gameId.
Unqualified game names are still supported as long as they are not
ambiguous. However they are considered deprecated and are no longer
displayed by the --list-games command.
2019-11-03 11:43:00 +01:00
Bastien Bouclet
ae9f764c7a ENGINES: Automatically upgrade the targets on launch to add an engine ID 2019-11-03 11:43:00 +01:00
Bastien Bouclet
7c570d9b25 GUI: Don't display the ScrollContainer background inside tabs
Fixes #10645.
2018-11-14 20:27:41 +01:00
Thierry Crozat
182a87f81c GUI: Use ScrollContainer in graphics tab
This fixes bug #10634 - GUI: Options cutoff for Edit Game when
Graphics mode is x2 or less
2018-07-22 00:01:01 +01:00
Bastien Bouclet
61f9398b04
Merge pull request #1187 from bgK/detection-refactor-unknown
ENGINES: Return unknown game variants with the list of detected games
2018-05-28 18:43:15 +02:00
Adrian Frühwirth
cee4d6b853 JANITORIAL: Fix trailing whitespace 2018-05-24 15:30:55 +02:00
Bastien Bouclet
8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet
0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +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
Torbjörn Andersson
665f5c99b2 JANITORIAL: Silence some more GCC 7 fall through warnings
I think these are the last one that were already flagged as being
deliberate.
2017-08-06 16:54:38 +02:00
Thierry Crozat
59675d2e4c GUI: Add Apply button in global options dialog 2016-10-30 15:43:14 +00:00
Eugene Sandulenko
e8b70a4686 ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02:00
Thierry Crozat
a87a702eb2 ALL: Homogeneize use of 'saved game' in messages 2016-09-18 16:40:34 +01:00
Alexander Tkachev
40dfb0b4f1 GUI: Fix Cloud-related dialogs a little
Minor mistakes which lead to build failure in some cases.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d5753a4847 CLOUD: Add auto-detect for downloaded game
If that's the game, that is.

Method is copy-pasted from Launcher, but fixed not to ask the directory
and thus doesn't contain the loop.
2016-08-24 16:07:55 +06:00