diff options
author | lubomyr | 2017-01-31 22:44:50 +0200 |
---|---|---|
committer | lubomyr | 2017-01-31 22:44:50 +0200 |
commit | 9cdda5c045bed4d3a8fe5fc841225f735624e341 (patch) | |
tree | 192e4ee9a4f57c7a0e5faeec1b923fdfddf30805 /gui | |
parent | 2aa0cdcff67bf423fd7eb5ed8b50749930d32a0f (diff) | |
download | scummvm-rg350-9cdda5c045bed4d3a8fe5fc841225f735624e341.tar.gz scummvm-rg350-9cdda5c045bed4d3a8fe5fc841225f735624e341.tar.bz2 scummvm-rg350-9cdda5c045bed4d3a8fe5fc841225f735624e341.zip |
ANDROIDSDL: implemented checkbox for show/hide on-screen control in Options menu
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 14 | ||||
-rw-r--r-- | gui/options.h | 1 | ||||
-rw-r--r-- | gui/themes/default.inc | 12 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 127241 -> 127377 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 | 1646781 -> 1646917 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, 38 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 30ca132516..4b2765698f 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -138,6 +138,7 @@ OptionsDialog::~OptionsDialog() { void OptionsDialog::init() { #ifdef ANDROIDSDL _enableAndroidSdlSettings = false; + _onscreenCheckbox = 0; _touchpadCheckbox = 0; #endif _enableGraphicSettings = false; @@ -209,6 +210,11 @@ void OptionsDialog::build() { #ifdef ANDROIDSDL // AndroidSDL options + if (ConfMan.hasKey("onscreen_control", _domain)) { + bool onscreenState = ConfMan.getBool("onscreen_control", _domain); + if (_onscreenCheckbox != 0) + _onscreenCheckbox->setState(onscreenState); + } if (ConfMan.hasKey("touchpad_mouse_mode", _domain)) { bool touchpadState = ConfMan.getBool("touchpad_mouse_mode", _domain); if (_touchpadCheckbox != 0) @@ -395,6 +401,10 @@ void OptionsDialog::open() { void OptionsDialog::apply() { #ifdef ANDROIDSDL if (_enableAndroidSdlSettings) { + if (ConfMan.getBool("onscreen_control", _domain) != _onscreenCheckbox->getState()) { + ConfMan.setBool("onscreen_control", _onscreenCheckbox->getState(), _domain); + g_system->setFeatureState(OSystem::kFeatureOnScreenControl, _onscreenCheckbox->getState()); + } if (ConfMan.getBool("touchpad_mouse_mode", _domain) != _touchpadCheckbox->getState()) { ConfMan.setBool("touchpad_mouse_mode", _touchpadCheckbox->getState(), _domain); g_system->setFeatureState(OSystem::kFeatureTouchpadMode, _touchpadCheckbox->getState()); @@ -822,9 +832,11 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) { #ifdef ANDROIDSDL void OptionsDialog::addAndroidSdlControls(GuiObject *boss, const Common::String &prefix) { + // Show On-Screen control + _onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", _("Show On-screen control")); // Touchpad Mouse mode _touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", _("Touchpad mouse mode")); - + _enableAndroidSdlSettings = true; } #endif diff --git a/gui/options.h b/gui/options.h index 046e9acf6d..3189c91982 100644 --- a/gui/options.h +++ b/gui/options.h @@ -123,6 +123,7 @@ private: bool _enableAndroidSdlSettings; CheckboxWidget *_touchpadCheckbox; + CheckboxWidget *_onscreenCheckbox; #endif // diff --git a/gui/themes/default.inc b/gui/themes/default.inc index a83fd788ad..54c63703b0 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -813,6 +813,18 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "</layout>" "</layout>" "</dialog>" + +"<dialog name='GlobalOptions_AndroidSdl' overlays='Dialog.GlobalOptions.TabWidget'>" +"<layout type='vertical' padding='16,16,16,16' spacing='8'>" +"<widget name='grOnScreenCheckbox' " +"type='Checkbox' " +"/>" +"<widget name='grTouchpadCheckbox' " +"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'>" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 175a646fd6..733668e5d6 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 d48f208714..f85020824d 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -240,6 +240,9 @@ <dialog name = 'GlobalOptions_AndroidSdl' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <widget name = 'grOnScreenCheckbox' + type = 'Checkbox' + /> <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index f58cf76e23..b660b4a8f5 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -237,6 +237,9 @@ <dialog name = 'GlobalOptions_AndroidSdl' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <widget name = 'grOnScreenCheckbox' + type = 'Checkbox' + /> <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex 8eb1353e27..1779d22d44 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 4ac032ac67..49fb4813a4 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -254,6 +254,9 @@ <dialog name = 'GlobalOptions_AndroidSdl' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <widget name = 'grOnScreenCheckbox' + type = 'Checkbox' + /> <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index f8e56f4083..4a74704c34 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -235,6 +235,9 @@ <dialog name = 'GlobalOptions_AndroidSdl' overlays = 'Dialog.GlobalOptions.TabWidget'> <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'> + <widget name = 'grOnScreenCheckbox' + type = 'Checkbox' + /> <widget name = 'grTouchpadCheckbox' type = 'Checkbox' /> |