GUI: Use ScrollContainer in graphics tab
This fixes bug #10634 - GUI: Options cutoff for Edit Game when Graphics mode is x2 or less
This commit is contained in:
parent
8f9daa906c
commit
182a87f81c
14 changed files with 97 additions and 14 deletions
|
@ -37,7 +37,7 @@
|
|||
#include "graphics/pixelformat.h"
|
||||
|
||||
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.24"
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.25"
|
||||
|
||||
class OSystem;
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "gui/widgets/edittext.h"
|
||||
#include "gui/widgets/tab.h"
|
||||
#include "gui/widgets/popup.h"
|
||||
#include "gui/widgets/scrollcontainer.h"
|
||||
|
||||
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
|
||||
#include "backends/cloud/cloudmanager.h"
|
||||
|
@ -72,7 +73,9 @@ enum {
|
|||
kCmdExtraPathClear = 'PEXC',
|
||||
kCmdGameBrowser = 'PGME',
|
||||
kCmdSaveBrowser = 'PSAV',
|
||||
kCmdSavePathClear = 'PSAC'
|
||||
kCmdSavePathClear = 'PSAC',
|
||||
|
||||
kGraphicsTabContainerReflowCmd = 'gtcr'
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -183,13 +186,15 @@ EditGameDialog::EditGameDialog(const String &domain)
|
|||
// 3) The graphics tab
|
||||
//
|
||||
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"));
|
||||
ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", kGraphicsTabContainerReflowCmd);
|
||||
graphicsContainer->setTarget(this);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalGraphicsOverride = new CheckboxWidget(tab, "GameOptions_Graphics.EnableTabCheckbox", _("Override global graphic settings"), 0, kCmdGlobalGraphicsOverride);
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), 0, kCmdGlobalGraphicsOverride);
|
||||
else
|
||||
_globalGraphicsOverride = new CheckboxWidget(tab, "GameOptions_Graphics.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), 0, kCmdGlobalGraphicsOverride);
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), 0, kCmdGlobalGraphicsOverride);
|
||||
|
||||
addGraphicControls(tab, "GameOptions_Graphics.");
|
||||
addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
|
||||
|
||||
//
|
||||
// 4) The audio tab
|
||||
|
@ -294,6 +299,11 @@ EditGameDialog::EditGameDialog(const String &domain)
|
|||
new ButtonWidget(this, "GameOptions.Ok", _("OK"), 0, kOKCmd);
|
||||
}
|
||||
|
||||
void EditGameDialog::setupGraphicsTab() {
|
||||
OptionsDialog::setupGraphicsTab();
|
||||
_globalGraphicsOverride->setVisible(true);
|
||||
}
|
||||
|
||||
void EditGameDialog::open() {
|
||||
OptionsDialog::open();
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ public:
|
|||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
|
||||
protected:
|
||||
virtual void setupGraphicsTab();
|
||||
|
||||
EditTextWidget *_descriptionWidget;
|
||||
DomainEditTextWidget *_domainWidget;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -106,6 +106,8 @@ protected:
|
|||
void setVolumeSettingsState(bool enabled);
|
||||
void setSubtitleSettingsState(bool enabled);
|
||||
|
||||
virtual void setupGraphicsTab();
|
||||
|
||||
bool loadMusicDeviceSetting(PopUpWidget *popup, Common::String setting, MusicType preferredType = MT_AUTO);
|
||||
void saveMusicDeviceSetting(PopUpWidget *popup, Common::String setting);
|
||||
|
||||
|
|
|
@ -2438,6 +2438,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
|||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'>"
|
||||
"<layout type='vertical' padding='0,0,0,0'>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalOptions_Graphics_Container' overlays='GlobalOptions_Graphics.Container'>"
|
||||
"<layout type='vertical' padding='16,16,16,16' spacing='8'>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
|
||||
"<widget name='grModePopupDesc' "
|
||||
|
@ -2995,11 +3000,16 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
|||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GameOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'>"
|
||||
"<layout type='vertical' padding='0,0,0,0'>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GameOptions_Graphics_Container' overlays='GameOptions_Graphics.Container'>"
|
||||
"<layout type='vertical' padding='8,8,8,8' spacing='6'>"
|
||||
"<widget name='EnableTabCheckbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<import layout='Dialog.GlobalOptions_Graphics' />"
|
||||
"<import layout='Dialog.GlobalOptions_Graphics_Container' />"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GameOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'>"
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
[SCUMMVM_STX0.8.24:ScummVM Classic Theme:No Author]
|
||||
[SCUMMVM_STX0.8.25:ScummVM Classic Theme:No Author]
|
||||
|
|
|
@ -275,6 +275,11 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'grModePopupDesc'
|
||||
|
@ -835,11 +840,16 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GameOptions_Graphics_Container' overlays = 'GameOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<widget name = 'EnableTabCheckbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics' />
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -272,6 +272,11 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'grModePopupDesc'
|
||||
|
@ -844,11 +849,16 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GameOptions_Graphics_Container' overlays = 'GameOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
|
||||
<widget name = 'EnableTabCheckbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics' />
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
[SCUMMVM_STX0.8.24:ScummVM Modern Theme:No Author]
|
||||
[SCUMMVM_STX0.8.25:ScummVM Modern Theme:No Author]
|
||||
|
|
|
@ -289,6 +289,11 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
|
||||
<widget name = 'grModePopupDesc'
|
||||
|
@ -849,11 +854,16 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GameOptions_Graphics_Container' overlays = 'GameOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<widget name = 'EnableTabCheckbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics' />
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -270,6 +270,11 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GlobalOptions_Graphics_Container' overlays = 'GlobalOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
|
||||
<widget name = 'grModePopupDesc'
|
||||
|
@ -842,11 +847,16 @@
|
|||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
|
||||
<layout type = 'vertical' padding = '0, 0, 0, 0'>
|
||||
<widget name = 'Container'/>
|
||||
</layout>
|
||||
</dialog>
|
||||
<dialog name = 'GameOptions_Graphics_Container' overlays = 'GameOptions_Graphics.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '6'>
|
||||
<widget name = 'EnableTabCheckbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics' />
|
||||
<import layout = 'Dialog.GlobalOptions_Graphics_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue