diff options
author | Thierry Crozat | 2018-07-22 00:01:01 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-07-22 00:01:01 +0100 |
commit | 182a87f81ce88a6cb6e36be172ab692f632296a0 (patch) | |
tree | 2ce28f265e14ee964dfe40bf2599b4c0a51a81c0 /gui/options.cpp | |
parent | 8f9daa906c3a43d00ce004494a87cfe698aa9150 (diff) | |
download | scummvm-rg350-182a87f81ce88a6cb6e36be172ab692f632296a0.tar.gz scummvm-rg350-182a87f81ce88a6cb6e36be172ab692f632296a0.tar.bz2 scummvm-rg350-182a87f81ce88a6cb6e36be172ab692f632296a0.zip |
GUI: Use ScrollContainer in graphics tab
This fixes bug #10634 - GUI: Options cutoff for Edit Game when
Graphics mode is x2 or less
Diffstat (limited to 'gui/options.cpp')
-rw-r--r-- | gui/options.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index bee161e2c9..7e5a3ac870 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -80,7 +80,8 @@ enum { kChooseThemeCmd = 'chtf', kUpdatesCheckCmd = 'updc', kKbdMouseSpeedChanged = 'kmsc', - kJoystickDeadzoneChanged= 'jodc' + kJoystickDeadzoneChanged= 'jodc', + kGraphicsTabContainerReflowCmd = 'gtcr' }; enum { @@ -836,6 +837,9 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data _joystickDeadzoneLabel->setValue(_joystickDeadzoneSlider->getValue()); _joystickDeadzoneLabel->markAsDirty(); break; + case kGraphicsTabContainerReflowCmd: + setupGraphicsTab(); + break; case kApplyCmd: apply(); break; @@ -1410,6 +1414,19 @@ void OptionsDialog::reflowLayout() { _tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX")); Dialog::reflowLayout(); + setupGraphicsTab(); +} + +void OptionsDialog::setupGraphicsTab() { + _gfxPopUpDesc->setVisible(true); + _gfxPopUp->setVisible(true); + _stretchPopUpDesc->setVisible(true); + _stretchPopUp->setVisible(true); + _fullscreenCheckbox->setVisible(true); + _filteringCheckbox->setVisible(true); + _aspectCheckbox->setVisible(true); + _renderModePopUpDesc->setVisible(true); + _renderModePopUp->setVisible(true); } #pragma mark - @@ -1493,7 +1510,9 @@ void GlobalOptionsDialog::build() { // 1) The graphics tab // _graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX")); - addGraphicControls(tab, "GlobalOptions_Graphics."); + ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", kGraphicsTabContainerReflowCmd); + graphicsContainer->setTarget(this); + addGraphicControls(graphicsContainer, "GlobalOptions_Graphics_Container."); // // The shader tab (currently visible only for Vita platform), visibility checking by features |