The backend options tab is for backend specific options. The backends
supporting it implements the function buildBackendOptionsWidget which
defines the options elements and layout.
The backend options tab layout may differ depending on the current
domain. The options in the "Global options" tab applies to all games
while the options in the "Game options" tab only applies to a specific
game. The options in the "Global config" options tab can be set during
game play. Some options, e.g. graphics cannot be changed while running
the game while backend options can.
The first version of the backend options tab was a non-scrollable
container. The "Game options" tab includes an "Override Global options
checkbox" which, when checked, enables the options defined by the
backend.
The number of iOS7 backend options increased rapidly which caused some
options to fall outside the tab container on screens with limited
space in height. An attempt to fix that was made by the same creator
of this commit in the commit: 8db736f155
The attempt was not perfect in any way, else this commit wouldn't
exist... The "Override Global options checkbox" on the "Game options"
tab became misplaced. It also required the backend to add padding
to GUI elements it shouldn't know of.
To fix this properly put the backend options tab in a single Scroll-
Container. This way the "Override Global options checkbox" can be
properly placed related to the backend options widgets. All backend
options can also be accessed in every backend options tab layout,
Global options, Game options and Global config thanks to the scrollbar
automatically provided by the ScrollContainer.
Update all themes with the new layout.
The same condition was scattered around in the code to switch between
normal labels and images and their lowres counterparts. Factorizing
that condition in a function will allow changing it easily.
Without this, the ports using backendOptions Widget could error trying to access the domain with the old name
For example, the Android port, upon editing and renaming the Game Id, would error with a message like "E/ScummVM: ConfigManager::removeKey(onscreen_control, bladerunner-final-win) called on non-existent domain". This is because in its AndroidOptionsWidget::save() method (called within OptionsDialog::apply()), there were calls to removeKey() which internally was using the stale/old _domain (domain name before the renaming)
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.