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

criezy criezy at scummvm.org
Mon Jul 9 22:31:28 CEST 2018


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:
81e0fa37ff GUI: Show saveload date/time, or playtime even if thumbnail not enabled
aa60f14f52 TINSEL: Remove thumbnail support


Commit: 81e0fa37ffaa4d711c7d5727e2b6caa969808bd0
    https://github.com/scummvm/scummvm/commit/81e0fa37ffaa4d711c7d5727e2b6caa969808bd0
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-07-09T21:31:23+01:00

Commit Message:
GUI: Show saveload date/time, or playtime even if thumbnail not enabled

Previously, if playtime or date/time support was added it would not be displayed
unless thumbnail support was also valid.

Now they will be shown even if the thumbnail is not valid.

No container is shown if only metainfo support is enabled.

Changed paths:
    gui/saveload-dialog.cpp


diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 8d59a63..2702cbe 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -463,13 +463,14 @@ void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uin
 }
 
 void SaveLoadChooserSimple::reflowLayout() {
-	if (g_gui.xmlEval()->getVar("Globals.SaveLoadChooser.ExtInfo.Visible") == 1 && _thumbnailSupport) {
+	if (g_gui.xmlEval()->getVar("Globals.SaveLoadChooser.ExtInfo.Visible") == 1 && (_thumbnailSupport || _saveDateSupport || _playTimeSupport)) {
 		int16 x, y;
 		uint16 w, h;
 
 		if (!g_gui.xmlEval()->getWidgetData("SaveLoadChooser.Thumbnail", x, y, w, h))
 			error("Error when loading position data for Save/Load Thumbnails");
 
+		// Even if there is no thumbnail support, getWidgetData() will provide default thumbnail values
 		int thumbW = kThumbnailWidth;
 		int thumbH = kThumbnailHeight2;
 		int thumbX = x + (w >> 1) - (thumbW >> 1);
@@ -483,28 +484,40 @@ void SaveLoadChooserSimple::reflowLayout() {
 		if (textLines > 0)
 			textLines++; // add a line of padding at the bottom
 
-		_container->resize(x, y, w, h + (kLineHeight * textLines));
-		_gfxWidget->resize(thumbX, thumbY, thumbW, thumbH);
+		if (_thumbnailSupport) {
+			_gfxWidget->resize(thumbX, thumbY, thumbW, thumbH);	
+			_gfxWidget->setVisible(true);
+		} else { 
+			// choose sensible values for displaying playtime and date/time when a thumbnail is not being used
+			thumbH = 0;
+			thumbY = y;
+			h = kLineHeight;
+			_gfxWidget->setVisible(false);
+		}
 
 		int height = thumbY + thumbH + kLineHeight;
 
 		if (_saveDateSupport) {
-			_date->resize(thumbX, height, kThumbnailWidth, kLineHeight);
+			_date->resize(thumbX, height, thumbW, kLineHeight);
 			height += kLineHeight;
-			_time->resize(thumbX, height, kThumbnailWidth, kLineHeight);
+			_time->resize(thumbX, height, thumbW, kLineHeight);
 			height += kLineHeight;
+			_date->setVisible(_saveDateSupport);
+			_time->setVisible(_saveDateSupport);
+		} else {
+			_date->setVisible(false);
+			_time->setVisible(false);
 		}
 
-		if (_playTimeSupport)
-			_playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight);
+		if (_playTimeSupport) {
+			_playtime->resize(thumbX, height, thumbW, kLineHeight);
+			_playtime->setVisible(_playTimeSupport);
+		} else {
+			_playtime->setVisible(false);
+		}
 
+		_container->resize(x, y, w, h + (kLineHeight * textLines));
 		_container->setVisible(true);
-		_gfxWidget->setVisible(true);
-
-		_date->setVisible(_saveDateSupport);
-		_time->setVisible(_saveDateSupport);
-
-		_playtime->setVisible(_playTimeSupport);
 
 		updateSelection(false);
 	} else {


Commit: aa60f14f5294b23b7b37737da5a1a76f5f1d7c1c
    https://github.com/scummvm/scummvm/commit/aa60f14f5294b23b7b37737da5a1a76f5f1d7c1c
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-07-09T21:31:23+01:00

Commit Message:
TINSEL: Remove thumbnail support

Changed paths:
    engines/tinsel/detection.cpp


diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index f847750..5d10fa1 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -113,7 +113,6 @@ bool TinselMetaEngine::hasFeature(MetaEngineFeature f) const {
 		(f == kSupportsDeleteSave) ||
 		(f == kSimpleSavesNames) ||
 		(f == kSavesSupportMetaInfo) ||
-		(f == kSavesSupportThumbnail) ||
 		(f == kSavesSupportCreationDate);
 }
 





More information about the Scummvm-git-logs mailing list