[Scummvm-git-logs] scummvm master -> dbf34b31e0a85b0b598336e3a70c01f1f38717dc

sev- noreply at scummvm.org
Fri Nov 24 01:15:25 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dbf34b31e0 GUI: Made HelpDialog resizable, moved it to the STX and bumped the theme version


Commit: dbf34b31e0a85b0b598336e3a70c01f1f38717dc
    https://github.com/scummvm/scummvm/commit/dbf34b31e0a85b0b598336e3a70c01f1f38717dc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-11-24T02:14:28+01:00

Commit Message:
GUI: Made HelpDialog resizable, moved it to the STX and bumped the theme version

Changed paths:
    gui/ThemeEngine.h
    gui/helpdialog.cpp
    gui/themes/common/highres_layout.stx
    gui/themes/common/lowres_layout.stx
    gui/themes/default.inc
    gui/themes/residualvm.zip
    gui/themes/residualvm/THEMERC
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/THEMERC
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/THEMERC
    gui/themes/scummremastered.zip
    gui/themes/scummremastered/THEMERC


diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 04e6cc65dbe..7a1e1b3a5a7 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -36,7 +36,7 @@
 #include "graphics/pixelformat.h"
 
 
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.9.13"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.9.14"
 
 class OSystem;
 
diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp
index 7beb61ed6b6..1d2a9d1337e 100644
--- a/gui/helpdialog.cpp
+++ b/gui/helpdialog.cpp
@@ -30,25 +30,9 @@
 namespace GUI {
 
 HelpDialog::HelpDialog()
-	: Dialog(30, 20, 260, 124) {
+	: Dialog("HelpDialog") {
 
-	const int screenW = g_system->getOverlayWidth();
-	const int screenH = g_system->getOverlayHeight();
-
-	int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
-	int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
-
-	_w = screenW * 8 / 10;
-	_h = screenH * 8 / 10;
-
-	// Center the dialog
-	_x = (screenW - _w) / 2;
-	_y = (screenH - _h) / 2;
-
-
-	int tabHeight = _h - (buttonHeight + 10) * 5 / 2;
-
-	TabWidget *tab = new TabWidget(this, 10, 10, _w - 10, tabHeight);
+	TabWidget *tab = new TabWidget(this, "HelpDialog.TabWidget");
 
 	tab->addTab(_("General"), "HelpDialog", false);
 	Common::U32String helpText1 = _(
@@ -68,7 +52,7 @@ HelpDialog::HelpDialog()
 "through affiliate referral links.\n"
 	);
 
-	new RichTextWidget(tab, 10, 10, _w - 10, tabHeight - buttonHeight - 10, helpText1);
+	new RichTextWidget(tab, "HelpDialog.TabWidget", helpText1);
 
 
 	// Now add backend-specific tabs if any
@@ -88,7 +72,7 @@ HelpDialog::HelpDialog()
 
 			tab->addTab(tabName, "HelpDialog", false);
 
-			RichTextWidget *rt = new RichTextWidget(tab, 10, 10, _w - 10, tabHeight - buttonHeight - 10, tabText);
+			RichTextWidget *rt = new RichTextWidget(tab, "HelpDialog.TabWidget", tabText);
 
 			if (imagePack)
 				rt->setImageArchive(imagePack);
@@ -97,7 +81,7 @@ HelpDialog::HelpDialog()
 
 	 tab->setActiveTab(0);
 
-	new ButtonWidget(this, _w - buttonWidth - 10, _h - buttonHeight - 10, buttonWidth, buttonHeight, Common::U32String("Close"), Common::U32String(), kCloseCmd);
+	new ButtonWidget(this, "HelpDialog.Close", Common::U32String("Close"), Common::U32String(), kCloseCmd);
 }
 
 void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 53483789226..167e653ae31 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -449,6 +449,18 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'HelpDialog' overlays = 'screen' inset = '32' shading = 'dim'>
+		<layout type = 'vertical' align = 'center' padding = '5, 5, 5, 5'>
+			<widget name = 'TabWidget' type = 'TabWidget'/>
+			<layout type = 'horizontal' padding = '16, 0, 8, 0'>
+				<space/>
+				<widget name = 'Close'
+						type = 'Button'
+				/>
+			</layout>
+		</layout>
+	</dialog>
+
 	<dialog name = 'Browser' overlays = 'Dialog.Launcher.GameList' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Headline'
diff --git a/gui/themes/common/lowres_layout.stx b/gui/themes/common/lowres_layout.stx
index e4fc6c928c4..08237d8f122 100644
--- a/gui/themes/common/lowres_layout.stx
+++ b/gui/themes/common/lowres_layout.stx
@@ -308,6 +308,18 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'HelpDialog' overlays = 'screen' inset = '8' shading = 'dim'>
+		<layout type = 'vertical' align = 'center' padding = '3, 3, 3, 3'>
+			<widget name = 'TabWidget' type = 'TabWidget'/>
+			<layout type = 'horizontal' padding = '8, 0, 4, 0'>
+				<space/>
+				<widget name = 'Close'
+						type = 'Button'
+				/>
+			</layout>
+		</layout>
+	</dialog>
+
 	<dialog name = 'Browser' overlays = 'screen' inset = '8' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 0, 4'>
 			<widget name = 'Headline'
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 1e3a561d874..5160cf87460 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1611,6 +1611,17 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</layout>"
 "</dialog>"
+"<dialog name='HelpDialog' overlays='screen' inset='32' shading='dim'>"
+"<layout type='vertical' align='center' padding='5,5,5,5'>"
+"<widget name='TabWidget' type='TabWidget'/>"
+"<layout type='horizontal' padding='16,0,8,0'>"
+"<space/>"
+"<widget name='Close' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</dialog>"
 "<dialog name='Browser' overlays='Dialog.Launcher.GameList' shading='dim'>"
 "<layout type='vertical' padding='8,8,8,8'>"
 "<widget name='Headline' "
@@ -3734,6 +3745,17 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "</layout>"
 "</layout>"
 "</dialog>"
+"<dialog name='HelpDialog' overlays='screen' inset='8' shading='dim'>"
+"<layout type='vertical' align='center' padding='3,3,3,3'>"
+"<widget name='TabWidget' type='TabWidget'/>"
+"<layout type='horizontal' padding='8,0,4,0'>"
+"<space/>"
+"<widget name='Close' "
+"type='Button' "
+"/>"
+"</layout>"
+"</layout>"
+"</dialog>"
 "<dialog name='Browser' overlays='screen' inset='8' shading='dim'>"
 "<layout type='vertical' padding='8,8,0,4'>"
 "<widget name='Headline' "
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 162f6573431..c7793c4ef66 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/THEMERC b/gui/themes/residualvm/THEMERC
index 8ab0db4b5dc..5c2edb156c2 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1,3 +1,3 @@
-[SCUMMVM_STX0.9.13:ResidualVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.9.14:ResidualVM Modern Theme Remastered:No Author]
 %using ../common
 %using ../common-svg
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 935d20d83d2..812c36dff14 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index 0bb7d105f71..ea4b9f73ff6 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.9.13:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.9.14:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 790566f6bd4..f3dfed4cab5 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -207,6 +207,18 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'HelpDialog' overlays = 'screen' inset = '32' shading = 'dim'>
+		<layout type = 'vertical' align = 'center' padding = '5, 5, 5, 5'>
+			<widget name = 'TabWidget' type = 'TabWidget'/>
+			<layout type = 'horizontal' padding = '16, 0, 8, 0'>
+				<space/>
+				<widget name = 'Close'
+						type = 'Button'
+				/>
+			</layout>
+		</layout>
+	</dialog>
+
 	<dialog name = 'Browser' overlays = 'Dialog.Launcher.GameList' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<widget name = 'Headline'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 9179f608e5f..f593f08f222 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -215,6 +215,18 @@
 		</layout>
 	</dialog>
 
+	<dialog name = 'HelpDialog' overlays = 'screen' inset = '8' shading = 'dim'>
+		<layout type = 'vertical' align = 'center' padding = '3, 3, 3, 3'>
+			<widget name = 'TabWidget' type = 'TabWidget'/>
+			<layout type = 'horizontal' padding = '8, 0, 4, 0'>
+				<space/>
+				<widget name = 'Close'
+						type = 'Button'
+				/>
+			</layout>
+		</layout>
+	</dialog>
+
 	<dialog name = 'Browser' overlays = 'screen' inset = '8' shading = 'dim'>
 		<layout type = 'vertical' padding = '8, 8, 0, 4'>
 			<widget name = 'Headline'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 3ed24ab5d17..03d2b24d388 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 488cd6549e1..5318e123d5f 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1,2 +1,2 @@
-[SCUMMVM_STX0.9.13:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.9.14:ScummVM Modern Theme:No Author]
 %using ../common
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 3d2f6c3a198..64b6b6137b7 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index 344fb930284..4e750345b70 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1,3 +1,3 @@
-[SCUMMVM_STX0.9.13:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.9.14:ScummVM Modern Theme Remastered:No Author]
 %using ../common
 %using ../common-svg




More information about the Scummvm-git-logs mailing list