Commit Graph

60 Commits

Author SHA1 Message Date
Eugene Sandulenko
109beb4f86 GUI: Explicitely use Common:: namespace 2021-11-12 14:46:34 +01:00
Cameron Cawley
2f99746d8d ENGINES: Allow implementing registerDefaultSettings in the MetaEngine class 2021-09-18 11:57:29 +02:00
Cameron Cawley
6edcd3c21c GUI: Fix displaying dynamic engine options widgets in the Edit Game dialog 2021-08-23 00:07:11 +03:00
antoniou
d62202801a GUI: Check for writable for save game path
This is done in Global Options, but it was skipped here in Game domain scope

This resulted in allowing bad paths (without write access) in this field
2021-07-13 16:51:56 +03:00
Cameron Cawley
b2d41daabc GUI: Add improved scaler selection to the Options dialog 2021-06-23 21:29:53 +02:00
antoniou79
ae5277f942 GUI: Update domain name for backendOptions upon renaming Game id
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)
2021-06-20 22:50:12 +03:00
lb_ii
a59108911d GUI: Use AchMan to get achievements descriptions 2021-06-10 01:56:23 +03:00
lb_ii
3ea4faeab7 GUI: Add Statistics dialog to game options 2021-06-01 02:20:53 +03:00
Thierry Crozat
982ccb12eb COMMON: Add GUIO_NOLANG GUI option to hide the lang selector 2021-04-19 23:10:12 +01:00
Cameron Cawley
76b25ec1c3 GUI: Add a checkbox to allow overriding the global backend settings 2021-03-15 16:52:52 +02:00
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