mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
GUI: Add option to enable/disable using the system file browser
This commit is contained in:
parent
319b90fb21
commit
e7ba15fa32
@ -37,7 +37,7 @@
|
||||
#include "graphics/pixelformat.h"
|
||||
|
||||
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.25"
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.26"
|
||||
|
||||
class OSystem;
|
||||
|
||||
|
@ -1468,6 +1468,7 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
|
||||
_guiLanguagePopUpDesc = 0;
|
||||
_guiLanguagePopUp = 0;
|
||||
_guiLanguageUseGameLanguageCheckbox = nullptr;
|
||||
_useSystemDialogsCheckbox = 0;
|
||||
#ifdef USE_UPDATES
|
||||
_updatesPopUpDesc = 0;
|
||||
_updatesPopUp = 0;
|
||||
@ -1704,6 +1705,17 @@ void GlobalOptionsDialog::build() {
|
||||
|
||||
#endif // USE_TRANSLATION
|
||||
|
||||
if (g_system->hasFeature(OSystem::kFeatureNativeFileBowserDialog)) {
|
||||
_useSystemDialogsCheckbox = new CheckboxWidget(tab, "GlobalOptions_Misc.UseSystemDialogs",
|
||||
_("Use native system file browser"),
|
||||
_("Use the native system file browser instead of the ScummVM one to select a file or directory.")
|
||||
);
|
||||
|
||||
if (ConfMan.hasKey("gui_browser_native")) {
|
||||
_useSystemDialogsCheckbox->setState(ConfMan.getBool("gui_browser_native", _domain));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_UPDATES
|
||||
_updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
|
||||
_updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup");
|
||||
@ -1977,6 +1989,10 @@ void GlobalOptionsDialog::apply() {
|
||||
ConfMan.setBool("gui_use_game_language", guiUseGameLanguage, _domain);
|
||||
#endif
|
||||
|
||||
if (_useSystemDialogsCheckbox) {
|
||||
ConfMan.setBool("gui_browser_native", _useSystemDialogsCheckbox->getState(), _domain);
|
||||
}
|
||||
|
||||
GUI::ThemeEngine::GraphicsMode gfxMode = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag();
|
||||
Common::String oldGfxConfig = ConfMan.get("gui_renderer");
|
||||
Common::String newGfxConfig = GUI::ThemeEngine::findModeConfigName(gfxMode);
|
||||
|
@ -282,6 +282,8 @@ protected:
|
||||
StaticTextWidget *_guiLanguagePopUpDesc;
|
||||
PopUpWidget *_guiLanguagePopUp;
|
||||
CheckboxWidget *_guiLanguageUseGameLanguageCheckbox;
|
||||
CheckboxWidget *_useSystemDialogsCheckbox;
|
||||
|
||||
|
||||
#ifdef USE_UPDATES
|
||||
StaticTextWidget *_updatesPopUpDesc;
|
||||
|
@ -1140,6 +1140,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"/>"
|
||||
"</layout>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>"
|
||||
"<widget name='UseSystemDialogs' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"</layout>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>"
|
||||
"<widget name='UpdatesPopupDesc' "
|
||||
"type='OptionsLabel' "
|
||||
"/>"
|
||||
@ -2749,6 +2754,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"/>"
|
||||
"</layout>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
|
||||
"<widget name='UseSystemDialogs' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"</layout>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
|
||||
"<widget name='UpdatesPopupDesc' "
|
||||
"width='80' "
|
||||
"height='Globals.Line.Height' "
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.25:ScummVM Classic Theme:No Author]
|
||||
[SCUMMVM_STX0.8.26:ScummVM Classic Theme:No Author]
|
||||
|
@ -572,6 +572,11 @@
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'UseSystemDialogs'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'UpdatesPopupDesc'
|
||||
type = 'OptionsLabel'
|
||||
|
@ -574,6 +574,11 @@
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'UseSystemDialogs'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'UpdatesPopupDesc'
|
||||
width = '80'
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.25:ScummVM Modern Theme:No Author]
|
||||
[SCUMMVM_STX0.8.26:ScummVM Modern Theme:No Author]
|
||||
|
@ -586,6 +586,11 @@
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'UseSystemDialogs'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'UpdatesPopupDesc'
|
||||
type = 'OptionsLabel'
|
||||
|
@ -572,6 +572,11 @@
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'UseSystemDialogs'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'UpdatesPopupDesc'
|
||||
width = '80'
|
||||
|
Loading…
Reference in New Issue
Block a user