diff options
author | lubomyr | 2017-02-14 17:38:44 +0200 |
---|---|---|
committer | lubomyr | 2017-02-14 17:38:44 +0200 |
commit | 2412502eee900208fe9d53f4ba99efb2dc357b6e (patch) | |
tree | a58af74f886a35b11d93b0323ee6d4ab9fbaf8bb /gui | |
parent | 216f9c4f11cd95f9e4ed049c9ecc97304e83f837 (diff) | |
download | scummvm-rg350-2412502eee900208fe9d53f4ba99efb2dc357b6e.tar.gz scummvm-rg350-2412502eee900208fe9d53f4ba99efb2dc357b6e.tar.bz2 scummvm-rg350-2412502eee900208fe9d53f4ba99efb2dc357b6e.zip |
ANDROIDSDL: implemented checkbox for swap menu and back buttons
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 20 | ||||
-rw-r--r-- | gui/options.h | 1 | ||||
-rw-r--r-- | gui/themes/default.inc | 18 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 127371 -> 127529 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern.zip | bin | 1646989 -> 1647069 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 3 |
9 files changed, 48 insertions, 3 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index fdd5db4c32..056476f170 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -139,6 +139,7 @@ void OptionsDialog::init() { _enableControlSettings = false; _onscreenCheckbox = 0; _touchpadCheckbox = 0; + _swapMenuAndBackBtnsCheckbox = 0; _enableGraphicSettings = false; _gfxPopUp = 0; _gfxPopUpDesc = 0; @@ -221,6 +222,13 @@ void OptionsDialog::build() { _touchpadCheckbox->setState(touchpadState); } } + if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons)) { + if (ConfMan.hasKey("swap_menu_and_back", _domain)) { + bool state = g_system->getFeatureState(OSystem::kFeatureSwapMenuAndBackButtons); + if (_swapMenuAndBackBtnsCheckbox != 0) + _swapMenuAndBackBtnsCheckbox->setState(state); + } + } // Graphic options if (_fullscreenCheckbox) { @@ -411,6 +419,11 @@ void OptionsDialog::apply() { g_system->setFeatureState(OSystem::kFeatureTouchpadMode, _touchpadCheckbox->getState()); } } + if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons)) { + if (ConfMan.getBool("swap_menu_and_back", _domain) != _swapMenuAndBackBtnsCheckbox->getState()) { + g_system->setFeatureState(OSystem::kFeatureSwapMenuAndBackButtons, _swapMenuAndBackBtnsCheckbox->getState()); + } + } } // Graphic options @@ -841,6 +854,10 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) { if (g_system->hasFeature(OSystem::kFeatureTouchpadMode)) _touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", _("Touchpad mouse mode")); + // Swap menu and back buttons + if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons)) + _swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", _("Swap Menu and Back buttons")); + _enableControlSettings = true; } @@ -1275,7 +1292,8 @@ void GlobalOptionsDialog::build() { // The control tab (currently visible only for AndroidSDL platform, visibility checking by features // if (g_system->hasFeature(OSystem::kFeatureTouchpadMode) || - g_system->hasFeature(OSystem::kFeatureOnScreenControl)) { + g_system->hasFeature(OSystem::kFeatureOnScreenControl) || + g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons)) { tab->addTab(_("Control")); addControlControls(tab, "GlobalOptions_Control."); } diff --git a/gui/options.h b/gui/options.h index cb86e265bb..626ffaf2db 100644 --- a/gui/options.h +++ b/gui/options.h @@ -122,6 +122,7 @@ private: CheckboxWidget *_touchpadCheckbox; CheckboxWidget *_onscreenCheckbox; + CheckboxWidget *_swapMenuAndBackBtnsCheckbox; // // Graphics controls diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 9254e97f40..d8baae8d0e 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -813,7 +813,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "</layout>" "</layout>" "</dialog>" - "<dialog name='GlobalOptions_Control' overlays='Dialog.GlobalOptions.TabWidget'>" "<layout type='vertical' padding='16,16,16,16' spacing='8'>" "<widget name='grOnScreenCheckbox' " @@ -822,9 +821,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "<widget name='grTouchpadCheckbox' " "type='Checkbox' " "/>" +"<widget name='grSwapMenuAndBackBtnsCheckbox' " +"type='Checkbox' " +"/>" "</layout>" "</dialog>" - "<dialog name='GlobalOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'>" "<layout type='vertical' padding='16,16,16,16' spacing='8'>" "<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>" @@ -2367,6 +2368,19 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "</layout>" "</layout>" "</dialog>" +"<dialog name='GlobalOptions_Control' overlays='Dialog.GlobalOptions.TabWidget'>" +"<layout type='vertical' padding='16,16,16,16' spacing='6'>" +"<widget name='grOnScreenCheckbox' " +"type='Checkbox' " +"/>" +"<widget name='grTouchpadCheckbox' " +"type='Checkbox' " +"/>" +"<widget name='grSwapMenuAndBackBtnsCheckbox' " +"type='Checkbox' " +"/>" +"</layout>" +"</dialog>" "<dialog name='GlobalOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'>" "<layout type='vertical' padding='16,16,16,16' spacing='8'>" "<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 22eaa76fde..d90289a4be 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index a1a148b0c7..aa91cdb35f 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -246,6 +246,9 @@ <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> + <widget name = 'grSwapMenuAndBackBtnsCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 1627ee6ce2..c925a39d18 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -243,6 +243,9 @@ <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> + <widget name = 'grSwapMenuAndBackBtnsCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex a42d6ed620..f10102503e 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 16e85a0761..80b913a3a4 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -260,6 +260,9 @@ <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> + <widget name = 'grSwapMenuAndBackBtnsCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index a2d51d9904..308ba44b7e 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -241,6 +241,9 @@ <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> + <widget name = 'grSwapMenuAndBackBtnsCheckbox' + type = 'Checkbox' + /> </layout> </dialog> |