diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 49 | ||||
-rw-r--r-- | gui/options.h | 8 | ||||
-rw-r--r-- | gui/themes/default.inc | 20 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 20021 -> 129631 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 13 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 13 | ||||
-rw-r--r-- | gui/themes/scummmodern.zip | bin | 739209 -> 1649171 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 13 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 13 |
9 files changed, 129 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index ae88781b71..5b62d493c4 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -159,6 +159,9 @@ void OptionsDialog::init() { _fullscreenCheckbox = 0; _filteringCheckbox = 0; _aspectCheckbox = 0; + _enableShaderSettings = false; + _shaderPopUpDesc = 0; + _shaderPopUp = 0; _enableAudioSettings = false; _midiPopUp = 0; _midiPopUpDesc = 0; @@ -315,6 +318,14 @@ void OptionsDialog::build() { } + // Shader options + if (g_system->hasFeature(OSystem::kFeatureShader)) { + if (_shaderPopUp) { + int value = ConfMan.getInt("shader", _domain); + _shaderPopUp->setSelected(value); + } + } + // Audio options if (!loadMusicDeviceSetting(_midiPopUp, "music_driver")) _midiPopUp->setSelected(0); @@ -549,6 +560,18 @@ void OptionsDialog::apply() { } } + // Shader options + if (_enableShaderSettings) { + if (g_system->hasFeature(OSystem::kFeatureShader)) { + if (_shaderPopUp) { + if (ConfMan.getInt("shader", _domain) != _shaderPopUp->getSelectedTag()) { + ConfMan.setInt("shader", _shaderPopUp->getSelectedTag(), _domain); + g_system->setShader(_shaderPopUp->getSelectedTag()); + } + } + } + } + // Control options if (_enableControlSettings) { if (g_system->hasFeature(OSystem::kFeatureOnScreenControl)) { @@ -967,6 +990,23 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr _enableControlSettings = true; } +void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &prefix) { + // Shader selector + if (g_system->hasFeature(OSystem::kFeatureShader)) { + if (g_system->getOverlayWidth() > 320) + _shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _("HW Shader:"), _("Different hardware shaders give different visual effects")); + else + _shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _c("HW Shader:", "lowres"), _("Different hardware shaders give different visual effects")); + _shaderPopUp = new PopUpWidget(boss, prefix + "grShaderPopUp", _("Different shaders give different visual effects")); + const OSystem::GraphicsMode *p = g_system->getSupportedShaders(); + while (p->name) { + _shaderPopUp->appendEntry(p->name, p->id); + p++; + } + } + _enableShaderSettings = true; +} + void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &prefix) { const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes(); Common::String context; @@ -1422,6 +1462,15 @@ void GlobalOptionsDialog::build() { addGraphicControls(tab, "GlobalOptions_Graphics."); // + // The shader tab (currently visible only for Vita platform), visibility checking by features + // + + if (g_system->hasFeature(OSystem::kFeatureShader)) { + tab->addTab(_("Shader")); + addShaderControls(tab, "GlobalOptions_Shader."); + } + + // // The control tab (currently visible only for AndroidSDL, SDL, and Vita platform, visibility checking by features // if (g_system->hasFeature(OSystem::kFeatureTouchpadMode) || diff --git a/gui/options.h b/gui/options.h index 2f628315e4..ed07307f80 100644 --- a/gui/options.h +++ b/gui/options.h @@ -89,6 +89,7 @@ protected: void addControlControls(GuiObject *boss, const Common::String &prefix); void addGraphicControls(GuiObject *boss, const Common::String &prefix); + void addShaderControls(GuiObject *boss, const Common::String &prefix); void addAudioControls(GuiObject *boss, const Common::String &prefix); void addMIDIControls(GuiObject *boss, const Common::String &prefix); void addMT32Controls(GuiObject *boss, const Common::String &prefix); @@ -142,6 +143,13 @@ private: CheckboxWidget *_aspectCheckbox; StaticTextWidget *_renderModePopUpDesc; PopUpWidget *_renderModePopUp; + + // + // Shader controls + // + bool _enableShaderSettings; + StaticTextWidget *_shaderPopUpDesc; + PopUpWidget *_shaderPopUp; // // Audio controls diff --git a/gui/themes/default.inc b/gui/themes/default.inc index f967067adc..6e79450e23 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -877,6 +877,16 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "/>" "</layout>" "</dialog>" +"<dialog name = 'GlobalOptions_Shader' overlays = 'Dialog.GlobalOptions.TabWidget'>" +"<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>" +"<widget name = 'grShaderPopUpDesc' " +"type = 'OptionsLabel' " +"/>" +"<widget name = 'grShaderPopUp' " +"type = 'PopUp' " +"/>" +"</layout>" +"</dialog>" "<dialog name='GlobalOptions_Audio' 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'>" @@ -2454,6 +2464,16 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "/>" "</layout>" "</dialog>" +"<dialog name = 'GlobalOptions_Shader' overlays = 'Dialog.GlobalOptions.TabWidget'>" +"<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>" +"<widget name = 'grShaderPopUpDesc' " +"type = 'OptionsLabel' " +"/>" +"<widget name = 'grShaderPopUp' " +"type = 'PopUp' " +"/>" +"</layout>" +"</dialog>" "<dialog name='GlobalOptions_Audio' 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 8024437f6b..bff0388d3e 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 35f4a03e6d..9d9fe28a16 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -304,6 +304,19 @@ </layout> </dialog> + <dialog name = 'GlobalOptions_Shader' 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'> + <widget name = 'grShaderPopUpDesc' + type = 'OptionsLabel' + /> + <widget name = 'grShaderPopUp' + type = 'PopUp' + /> + </layout> + </layout> + </dialog> + <dialog name = 'GlobalOptions_Audio' 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/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 1085c5fc6f..d0c3170d8e 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -301,6 +301,19 @@ </layout> </dialog> + <dialog name = 'GlobalOptions_Shader' 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'> + <widget name = 'grShaderPopUpDesc' + type = 'OptionsLabel' + /> + <widget name = 'grShaderPopUp' + type = 'PopUp' + /> + </layout> + </layout> + </dialog> + <dialog name = 'GlobalOptions_Audio' 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/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex 73aee35f61..983f727f6a 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 9633cb4e50..25a95845aa 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -318,6 +318,19 @@ </layout> </dialog> + <dialog name = 'GlobalOptions_Shader' 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'> + <widget name = 'grShaderPopUpDesc' + type = 'OptionsLabel' + /> + <widget name = 'grShaderPopUp' + type = 'PopUp' + /> + </layout> + </layout> + </dialog> + <dialog name = 'GlobalOptions_Audio' 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/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index be8ce0c17e..3da8a6c6a3 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -299,6 +299,19 @@ </layout> </dialog> + <dialog name = 'GlobalOptions_Shader' 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'> + <widget name = 'grShaderPopUpDesc' + type = 'OptionsLabel' + /> + <widget name = 'grShaderPopUp' + type = 'PopUp' + /> + </layout> + </layout> + </dialog> + <dialog name = 'GlobalOptions_Audio' 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'> |