[Scummvm-git-logs] scummvm master -> 15be37dd64b57703ab821f13a4b34d1665202f13
sev-
noreply at scummvm.org
Mon Mar 11 00:03:41 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3c36c1fbc3 GUI: Put backend options tab elements into a ScrollContainer
15be37dd64 IOS7: Update backend options tab layout
Commit: 3c36c1fbc34a1ac6be8b1d8d9c89966aab2f3671
https://github.com/scummvm/scummvm/commit/3c36c1fbc34a1ac6be8b1d8d9c89966aab2f3671
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2024-03-11T01:03:37+01:00
Commit Message:
GUI: Put backend options tab elements into a ScrollContainer
The backend options tab is for backend specific options. The backends
supporting it implements the function buildBackendOptionsWidget which
defines the options elements and layout.
The backend options tab layout may differ depending on the current
domain. The options in the "Global options" tab applies to all games
while the options in the "Game options" tab only applies to a specific
game. The options in the "Global config" options tab can be set during
game play. Some options, e.g. graphics cannot be changed while running
the game while backend options can.
The first version of the backend options tab was a non-scrollable
container. The "Game options" tab includes an "Override Global options
checkbox" which, when checked, enables the options defined by the
backend.
The number of iOS7 backend options increased rapidly which caused some
options to fall outside the tab container on screens with limited
space in height. An attempt to fix that was made by the same creator
of this commit in the commit: 8db736f1559b
The attempt was not perfect in any way, else this commit wouldn't
exist... The "Override Global options checkbox" on the "Game options"
tab became misplaced. It also required the backend to add padding
to GUI elements it shouldn't know of.
To fix this properly put the backend options tab in a single Scroll-
Container. This way the "Override Global options checkbox" can be
properly placed related to the backend options widgets. All backend
options can also be accessed in every backend options tab layout,
Global options, Game options and Global config thanks to the scrollbar
automatically provided by the ScrollContainer.
Update all themes with the new layout.
Changed paths:
engines/dialogs.cpp
gui/editgamedialog.cpp
gui/options.cpp
gui/themes/common/highres_layout.stx
gui/themes/common/lowres_layout.stx
gui/themes/residualvm.zip
gui/themes/scummclassic.zip
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummclassic/classic_layout_lowres.stx
gui/themes/scummmodern.zip
gui/themes/scummremastered.zip
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index fed52f81774..1e3b1aca1f5 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -36,6 +36,7 @@
#include "gui/ThemeEval.h"
#include "gui/widget.h"
#include "gui/widgets/tab.h"
+#include "gui/widgets/scrollcontainer.h"
#include "graphics/font.h"
@@ -347,7 +348,11 @@ ConfigDialog::ConfigDialog() :
//
int backendTabId = tab->addTab(_("Backend"), "GlobalConfig_Backend", false);
- _backendOptions = g_system->buildBackendOptionsWidget(tab, "GlobalConfig_Backend.Container", gameDomain);
+ ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GlobalConfig_Backend.Container", "GlobalConfig_Backend_Container");
+ backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+ backendContainer->setTarget(this);
+
+ _backendOptions = g_system->buildBackendOptionsWidget(backendContainer, "GlobalConfig_Backend_Container.Container", gameDomain);
if (_backendOptions) {
_backendOptions->setParentDialog(this);
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index d8fc3cf9bdc..e5a09f78d9b 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -224,13 +224,17 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
//
int backendTabId = tab->addTab(_("Backend"), "GameOptions_Backend", false);
+ ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GameOptions_Backend.Container", "GameOptions_Backend_Container");
+ backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+ backendContainer->setTarget(this);
+
if (!g_gui.useLowResGUI())
- _globalBackendOverride = new CheckboxWidget(tab, "GameOptions_Backend.EnableTabCheckbox", _("Override global backend settings"), Common::U32String(), kCmdGlobalBackendOverride);
+ _globalBackendOverride = new CheckboxWidget(backendContainer, "GameOptions_Backend_Container.EnableTabCheckbox", _("Override global backend settings"), Common::U32String(), kCmdGlobalBackendOverride);
else
- _globalBackendOverride = new CheckboxWidget(tab, "GameOptions_Backend.EnableTabCheckbox", _c("Override global backend settings", "lowres"), Common::U32String(), kCmdGlobalBackendOverride);
+ _globalBackendOverride = new CheckboxWidget(backendContainer, "GameOptions_Backend_Container.EnableTabCheckbox", _c("Override global backend settings", "lowres"), Common::U32String(), kCmdGlobalBackendOverride);
g_system->registerDefaultSettings(_domain);
- _backendOptions = g_system->buildBackendOptionsWidget(tab, "GameOptions_Backend.Container", _domain);
+ _backendOptions = g_system->buildBackendOptionsWidget(backendContainer, "GameOptions_Backend_Container.Container", _domain);
if (_backendOptions) {
_backendOptions->setParentDialog(this);
diff --git a/gui/options.cpp b/gui/options.cpp
index 31f646e14c9..7b8570bf641 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2237,8 +2237,12 @@ void GlobalOptionsDialog::build() {
//
int backendTabId = tab->addTab(_("Backend"), "GlobalOptions_Backend", false);
+ ScrollContainerWidget *backendContainer = new ScrollContainerWidget(tab, "GlobalOptions_Backend.Container", "GlobalOptions_Backend_Container");
+ backendContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
+ backendContainer->setTarget(this);
+
g_system->registerDefaultSettings(_domain);
- _backendOptions = g_system->buildBackendOptionsWidget(tab, "GlobalOptions_Backend.Container", _domain);
+ _backendOptions = g_system->buildBackendOptionsWidget(backendContainer, "GlobalOptions_Backend_Container.Container", _domain);
if (_backendOptions) {
_backendOptions->setParentDialog(this);
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 05a2b970f52..92e4a1938b4 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -709,6 +709,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1643,15 +1649,23 @@
<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
- <widget name = 'EnableTabCheckbox'
- type = 'Checkbox'
- />
<widget name = 'Container'
type = 'ScrollContainerWidget'
/>
</layout>
</dialog>
+ <dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ </layout>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GameOptions_Achievements' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1957,6 +1971,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalConfig_Achievements' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index f7ea53f6b56..a5d8f9c4ee3 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -549,6 +549,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1473,15 +1479,23 @@
<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
- <widget name = 'EnableTabCheckbox'
- type = 'Checkbox'
- />
<widget name = 'Container'
type = 'ScrollContainerWidget'
/>
</layout>
</dialog>
+ <dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ </layout>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GameOptions_Achievements' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1793,6 +1807,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalConfig_Achievements' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 288fb6aa8b4..d46df99748e 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 03377badcad..954583dc85a 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 5af79cd38b9..6de846c447b 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -387,6 +387,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1290,15 +1296,23 @@
<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
- <widget name = 'EnableTabCheckbox'
- type = 'Checkbox'
- />
<widget name = 'Container'
type = 'ScrollContainerWidget'
/>
</layout>
</dialog>
+ <dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ </layout>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GameOptions_Achievements' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1604,6 +1618,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalConfig_Achievements' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index c557465da14..1b591688485 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -394,6 +394,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalOptions_Backend_Container' overlays = 'GlobalOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <widget name = 'Container'/>
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1302,15 +1308,23 @@
<dialog name = 'GameOptions_Backend' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
- <widget name = 'EnableTabCheckbox'
- type = 'Checkbox'
- />
<widget name = 'Container'
type = 'ScrollContainerWidget'
/>
</layout>
</dialog>
+ <dialog name = 'GameOptions_Backend_Container' overlays = 'GameOptions_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
+ <widget name = 'EnableTabCheckbox'
+ type = 'Checkbox'
+ />
+ </layout>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GameOptions_Achievements' overlays = 'Dialog.GameOptions.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
@@ -1621,6 +1635,12 @@
</layout>
</dialog>
+ <dialog name = 'GlobalConfig_Backend_Container' overlays = 'GlobalConfig_Backend.Container'>
+ <layout type = 'vertical' padding = '0, 0, 0, 0'>
+ <import layout = 'Dialog.GlobalOptions_Backend_Container' />
+ </layout>
+ </dialog>
+
<dialog name = 'GlobalConfig_Achievements' overlays = 'Dialog.GlobalConfig.TabWidget'>
<layout type = 'vertical' padding = '0, 0, 0, 0'>
<widget name = 'Container'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index c7d8a842f22..d7bf04332d3 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 6feb442cb40..4328ad5bdb1 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
Commit: 15be37dd64b57703ab821f13a4b34d1665202f13
https://github.com/scummvm/scummvm/commit/15be37dd64b57703ab821f13a4b34d1665202f13
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2024-03-11T01:03:37+01:00
Commit Message:
IOS7: Update backend options tab layout
The backend options widget is now in a scrollcontainer widget.
Change the options widget to not be scrollable since the parent
widget is and remove unnecessary padding.
Changed paths:
backends/platform/ios7/ios7_options.mm
diff --git a/backends/platform/ios7/ios7_options.mm b/backends/platform/ios7/ios7_options.mm
index 42c48a86381..d52bb0d4c74 100644
--- a/backends/platform/ios7/ios7_options.mm
+++ b/backends/platform/ios7/ios7_options.mm
@@ -92,7 +92,7 @@ private:
};
IOS7OptionsWidget::IOS7OptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
- OptionsContainerWidget(boss, name, "IOS7OptionsDialog", true, domain), _enabled(true) {
+ OptionsContainerWidget(boss, name, "IOS7OptionsDialog", false, domain), _enabled(true) {
_gamepadControllerCheckbox = new GUI::CheckboxWidget(widgetsBoss(), "IOS7OptionsDialog.GamepadController", _("Show Gamepad Controller (iOS 15 and later)"));
_gamepadControllerOpacityDesc = new GUI::StaticTextWidget(widgetsBoss(), "IOS7OptionsDialog.GamepadControllerOpacity", _("Gamepad opacity"));
@@ -177,7 +177,6 @@ void IOS7OptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::Stri
layouts.addDialog(layoutName, overlayedLayout)
.addLayout(GUI::ThemeLayout::kLayoutVertical)
- .addPadding(16, 16, 16, 16)
#if TARGET_OS_IOS
.addWidget("OnscreenControl", "Checkbox")
#endif
More information about the Scummvm-git-logs
mailing list