mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
GUI: Generate ExtraGuiOptions dynamically in a scrollable container (#2783)
This allows for the removal of hardcoded extra GUI options from the theme files, and lifts restrictions related to the maximum number of allowed ExtraGuiOptions
This commit is contained in:
parent
a7b776cab5
commit
f9f7d0eb10
@ -407,21 +407,13 @@ void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32
|
||||
#endif
|
||||
|
||||
ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options) :
|
||||
OptionsContainerWidget(containerBoss, name, dialogLayout(domain), false, domain),
|
||||
OptionsContainerWidget(containerBoss, name, dialogLayout(domain), true, domain),
|
||||
_options(options) {
|
||||
|
||||
// Note: up to 7 engine options can currently fit on screen (the most that
|
||||
// can fit in a 320x200 screen with the classic theme).
|
||||
// TODO: Increase this number by including the checkboxes inside a scroll
|
||||
// widget. The appropriate number of checkboxes will need to be added to
|
||||
// the theme files.
|
||||
|
||||
uint i = 1;
|
||||
ExtraGuiOptions::const_iterator iter;
|
||||
for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
|
||||
Common::String id = Common::String::format("%d", i);
|
||||
for (uint i = 0; i < _options.size(); i++) {
|
||||
Common::String id = Common::String::format("%d", i + 1);
|
||||
_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
|
||||
_dialogLayout + ".customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
|
||||
_dialogLayout + ".customOption" + id + "Checkbox", _(_options[i].label), _(_options[i].tooltip)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,7 +430,7 @@ Common::String ExtraGuiOptionsWidget::dialogLayout(const Common::String &domain)
|
||||
|
||||
void ExtraGuiOptionsWidget::load() {
|
||||
// Set the state of engine-specific checkboxes
|
||||
for (uint j = 0; j < _options.size(); ++j) {
|
||||
for (uint j = 0; j < _options.size() && j < _checkboxes.size(); ++j) {
|
||||
// The default values for engine-specific checkboxes are not set when
|
||||
// ScummVM starts, as this would require us to load and poll all of the
|
||||
// engine plugins on startup. Thus, we set the state of each custom
|
||||
@ -454,11 +446,23 @@ void ExtraGuiOptionsWidget::load() {
|
||||
|
||||
bool ExtraGuiOptionsWidget::save() {
|
||||
// Set the state of engine-specific checkboxes
|
||||
for (uint i = 0; i < _options.size(); i++) {
|
||||
for (uint i = 0; i < _options.size() && i < _checkboxes.size(); i++) {
|
||||
ConfMan.setBool(_options[i].configOption, _checkboxes[i]->getState(), _domain);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ExtraGuiOptionsWidget::defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const {
|
||||
layouts.addDialog(layoutName, overlayedLayout);
|
||||
layouts.addLayout(GUI::ThemeLayout::kLayoutVertical).addPadding(8, 8, 8, 8);
|
||||
|
||||
for (uint i = 0; i < _options.size(); i++) {
|
||||
Common::String id = Common::String::format("%d", i + 1);
|
||||
layouts.addWidget("customOption" + id + "Checkbox", "Checkbox");
|
||||
}
|
||||
|
||||
layouts.closeLayout().closeDialog();
|
||||
}
|
||||
|
||||
} // End of namespace GUI
|
||||
|
@ -110,6 +110,9 @@ public:
|
||||
void load() override;
|
||||
bool save() override;
|
||||
|
||||
protected:
|
||||
void defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const override;
|
||||
|
||||
private:
|
||||
typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "graphics/pixelformat.h"
|
||||
|
||||
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.41"
|
||||
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.42"
|
||||
|
||||
class OSystem;
|
||||
|
||||
|
@ -2524,31 +2524,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GameOptions_Engine_Container' overlays='GameOptions_Engine.Container'>"
|
||||
"<layout type='vertical' padding='16,16,16,16'>"
|
||||
"<widget name='customOption1Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption2Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption3Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption4Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption5Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption6Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption7Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalMenu' overlays='screen_center'>"
|
||||
"<layout type='vertical' padding='16,16,16,16' align='center'>"
|
||||
"<widget name='Title' "
|
||||
@ -2620,11 +2595,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalConfig_Engine_Container' overlays='Dialog.GlobalConfig_Engine.Container'>"
|
||||
"<layout type='vertical' padding='16,16,16,16'>"
|
||||
"<import layout='Dialog.GameOptions_Engine_Container' />"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
|
||||
"<layout type='vertical' padding='8,8,8,8' spacing='8'>"
|
||||
"<layout type='horizontal' padding='0,0,0,0'>"
|
||||
@ -4410,31 +4380,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GameOptions_Engine_Container' overlays='GameOptions_Engine.Container'>"
|
||||
"<layout type='vertical' padding='8,8,8,8'>"
|
||||
"<widget name='customOption1Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption2Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption3Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption4Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption5Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption6Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"<widget name='customOption7Checkbox' "
|
||||
"type='Checkbox' "
|
||||
"/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalMenu' overlays='screen_center'>"
|
||||
"<layout type='vertical' padding='2,2,2,6' align='center' spacing='0'>"
|
||||
"<widget name='Title' "
|
||||
@ -4507,11 +4452,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
|
||||
"<widget name='Container'/>"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalConfig_Engine_Container' overlays='Dialog.GlobalConfig_Engine.Container'>"
|
||||
"<layout type='vertical' padding='8,8,8,8'>"
|
||||
"<import layout='Dialog.GameOptions_Engine_Container' />"
|
||||
"</layout>"
|
||||
"</dialog>"
|
||||
"<dialog name='GlobalConfig_Audio' overlays='Dialog.GlobalConfig.TabWidget'>"
|
||||
"<layout type='vertical' padding='8,8,8,8'>"
|
||||
"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.41:ResidualVM Modern Theme:No Author]
|
||||
[SCUMMVM_STX0.8.42:ResidualVM Modern Theme:No Author]
|
||||
|
@ -1199,32 +1199,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
|
||||
<widget name = 'Logo'
|
||||
@ -1299,12 +1273,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||
|
@ -1193,32 +1193,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
|
||||
<widget name = 'Title'
|
||||
@ -1293,12 +1267,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.41:ScummVM Classic Theme:No Author]
|
||||
[SCUMMVM_STX0.8.42:ScummVM Classic Theme:No Author]
|
||||
|
@ -1184,32 +1184,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
|
||||
<widget name = 'Title'
|
||||
@ -1284,12 +1258,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||
|
@ -1194,32 +1194,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '2, 2, 2, 6' align = 'center' spacing='0'>
|
||||
<widget name = 'Title'
|
||||
@ -1295,12 +1269,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.41:ScummVM Modern Theme:No Author]
|
||||
[SCUMMVM_STX0.8.42:ScummVM Modern Theme:No Author]
|
||||
|
@ -1199,32 +1199,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
|
||||
<widget name = 'Logo'
|
||||
@ -1299,12 +1273,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||
|
@ -1193,32 +1193,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
|
||||
<widget name = 'Title'
|
||||
@ -1293,12 +1267,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
[SCUMMVM_STX0.8.41:ScummVM Modern Theme Remastered:No Author]
|
||||
[SCUMMVM_STX0.8.42:ScummVM Modern Theme Remastered:No Author]
|
||||
|
@ -1199,32 +1199,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16' align = 'center'>
|
||||
<widget name = 'Logo'
|
||||
@ -1299,12 +1273,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '16, 16, 16, 16'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||
|
@ -1193,32 +1193,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GameOptions_Engine_Container' overlays = 'GameOptions_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<widget name = 'customOption1Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption2Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption3Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption4Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption5Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption6Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
<widget name = 'customOption7Checkbox'
|
||||
type = 'Checkbox'
|
||||
/>
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalMenu' overlays = 'screen_center'>
|
||||
<layout type = 'vertical' padding = '4, 4, 4, 4' align = 'center' spacing='2'>
|
||||
<widget name = 'Title'
|
||||
@ -1293,12 +1267,6 @@
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Engine_Container' overlays = 'Dialog.GlobalConfig_Engine.Container'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<import layout = 'Dialog.GameOptions_Engine_Container' />
|
||||
</layout>
|
||||
</dialog>
|
||||
|
||||
<dialog name = 'GlobalConfig_Audio' overlays = 'Dialog.GlobalConfig.TabWidget'>
|
||||
<layout type = 'vertical' padding = '8, 8, 8, 8'>
|
||||
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
|
||||
|
@ -941,7 +941,7 @@ OptionsContainerWidget::OptionsContainerWidget(GuiObject *boss, const Common::St
|
||||
_scrollContainer(nullptr) {
|
||||
|
||||
if (scrollable) {
|
||||
_scrollContainer = new ScrollContainerWidget(this, 0, 0, 0, 0, kReflowCmd);
|
||||
_scrollContainer = new ScrollContainerWidget(this, name, _dialogLayout, kReflowCmd);
|
||||
_scrollContainer->setTarget(this);
|
||||
_scrollContainer->setBackgroundType(GUI::ThemeEngine::kWidgetBackgroundNo);
|
||||
}
|
||||
@ -958,7 +958,9 @@ void OptionsContainerWidget::reflowLayout() {
|
||||
defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
|
||||
}
|
||||
|
||||
g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
|
||||
if (!_scrollContainer) {
|
||||
g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
|
||||
}
|
||||
}
|
||||
|
||||
if (_scrollContainer) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user