[Scummvm-git-logs] scummvm master -> 3ff0d353be34c57fd157673db06ca8cf5ed1946e

sev- noreply at scummvm.org
Sun Jul 30 19:34:50 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:
3ff0d353be GUI: FIx dialog dumping to PNG


Commit: 3ff0d353be34c57fd157673db06ca8cf5ed1946e
    https://github.com/scummvm/scummvm/commit/3ff0d353be34c57fd157673db06ca8cf5ed1946e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-07-30T21:34:30+02:00

Commit Message:
GUI: FIx dialog dumping to PNG

Changed paths:
    gui/dialog.h
    gui/dump-all-dialogs.cpp


diff --git a/gui/dialog.h b/gui/dialog.h
index 06eba26c25b..bcd0cf2fb82 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -92,10 +92,10 @@ public:
 	virtual void lostFocus();
 	virtual void receivedFocus(int x = -1, int y = -1) { if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); }
 
-protected:
 	virtual void open();
 	virtual void close();
 
+protected:
 	/** Recursively mark all the widgets in this dialog as dirty so they are redrawn */
 	void markWidgetsAsDirty();
 
diff --git a/gui/dump-all-dialogs.cpp b/gui/dump-all-dialogs.cpp
index dce64245799..7c54d46e487 100644
--- a/gui/dump-all-dialogs.cpp
+++ b/gui/dump-all-dialogs.cpp
@@ -44,6 +44,8 @@ void saveGUISnapshot(Graphics::Surface surf, const Common::String &filename) {
 		Image::writePNG(outFile, surf);
 		outFile.finalize();
 		outFile.close();
+
+		warning("Dumped %s", filename.c_str());
 	}
 }
 
@@ -65,15 +67,16 @@ void dumpDialogs(const Common::String &message, int res, const Common::String &l
 
 	// MessageDialog
 	GUI::MessageDialog messageDialog(message);
-	messageDialog.runModal();     // For rendering
+	messageDialog.open();     // For rendering
 	messageDialog.reflowLayout(); // For updating surface
 	g_gui.redrawFull();
 	g_system->grabOverlay(surf);
 	saveGUISnapshot(surf, "message-" + filename);
+	messageDialog.close();
 
 	// AboutDialog
 	GUI::AboutDialog aboutDialog;
-	aboutDialog.runModal();     // For rendering
+	aboutDialog.open();     // For rendering
 	aboutDialog.reflowLayout(); // For updating surface
 	g_gui.redrawFull();
 	g_system->grabOverlay(surf);
@@ -81,11 +84,14 @@ void dumpDialogs(const Common::String &message, int res, const Common::String &l
 	aboutDialog.close();
 
 	// LauncherDialog
+#if 0
 	GUI::LauncherChooser chooser;
 	chooser.selectLauncher();
-	chooser.runModal();
+	chooser.open();
 	g_system->grabOverlay(surf);
 	saveGUISnapshot(surf, "launcher-" + filename);
+	chooser.close();
+#endif
 }
 
 void dumpAllDialogs(const Common::String &message) {




More information about the Scummvm-git-logs mailing list