[Scummvm-cvs-logs] SF.net SVN: scummvm: [22018] scummvm/trunk/engines/scumm

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Apr 18 18:08:03 CEST 2006


Revision: 22018
Author:   lordhoto
Date:     2006-04-18 18:07:16 -0700 (Tue, 18 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22018&view=rev

Log Message:
-----------
Updates scumm dialogs for runtime overlay resolution changes.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/dialogs.cpp
    scummvm/trunk/engines/scumm/dialogs.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp	2006-04-19 01:05:28 UTC (rev 22017)
+++ scummvm/trunk/engines/scumm/dialogs.cpp	2006-04-19 01:07:16 UTC (rev 22018)
@@ -281,6 +281,7 @@
 	SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode);
 
 	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+	void handleScreenChanged() { ChooserDialog::handleScreenChanged(); }
 	const String &getResultString() const;
 	void setList(const StringList& list) { GUI_ChooserDialog::setList(list); }
 	int runModal() { return GUI_ChooserDialog::runModal(); }
@@ -511,6 +512,27 @@
 }
 
 void SaveLoadChooserEx::handleScreenChanged() {
+	Dialog::handleScreenChanged();
+
+	int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
+	int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
+
+	// Add the thumbnail display
+	_gfxWidget->resize(thumbX, thumbY, kThumbnailWidth + 8,
+			((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8);
+
+	int height = thumbY + ((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
+
+	_date->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
+	height += kLineHeight;
+
+	_time->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
+	height += kLineHeight;
+
+	_playtime->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
 	int selItem = _list->getSelected();
 	Graphics::Surface *thumb;
 	thumb = _scumm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
@@ -518,8 +540,6 @@
 	if (thumb)
 		thumb->free();
 	delete thumb;
-
-	Dialog::handleScreenChanged();
 }
 
 #pragma mark -
@@ -617,6 +637,17 @@
 	}
 }
 
+void MainMenuDialog::handleScreenChanged() {
+	_optionsDialog->handleScreenChanged();
+	_aboutDialog->handleScreenChanged();
+	_saveDialog->handleScreenChanged();
+	_loadDialog->handleScreenChanged();
+#ifndef DISABLE_HELP
+	_helpDialog->handleScreenChanged();
+#endif
+	ScummDialog::handleScreenChanged();
+}
+
 void MainMenuDialog::save() {
 	int idx;
 	_saveDialog->setList(generateSavegameList(_vm, true));

Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h	2006-04-19 01:05:28 UTC (rev 22017)
+++ scummvm/trunk/engines/scumm/dialogs.h	2006-04-19 01:07:16 UTC (rev 22018)
@@ -64,6 +64,8 @@
 	virtual const Common::String &getResultString() const = 0;
 	virtual void setList(const Common::StringList& list) = 0;
 	virtual int runModal() = 0;
+
+	virtual void handleScreenChanged() = 0;
 };
 
 class MainMenuDialog : public ScummDialog {
@@ -71,6 +73,7 @@
 	MainMenuDialog(ScummEngine *scumm);
 	~MainMenuDialog();
 	virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+	virtual void handleScreenChanged();
 
 protected:
 	GUI::Dialog		*_aboutDialog;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list