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.
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.)
- 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.
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
- 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
- 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
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
- ButtonWidgets (Button, Radio, Checkbox, dropdown)
- StaticTextWidgets
- PopUpWidgets
- Tabs
- Add a temporary overloaded drawDDText function to make other widgets draw normally
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.
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.
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.
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.
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.
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.