[Scummvm-cvs-logs] SF.net SVN: scummvm:[39939] scummvm/trunk/engines/saga/interface.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sat Apr 11 22:16:37 CEST 2009


Revision: 39939
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39939&view=rev
Author:   eriktorbjorn
Date:     2009-04-11 20:16:37 +0000 (Sat, 11 Apr 2009)

Log Message:
-----------
When dragging the save/load dialog's scrollbar handle past the top of the
scrollbar, stay at the top. Don't jump to the bottom.

Modified Paths:
--------------
    scummvm/trunk/engines/saga/interface.cpp

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2009-04-11 17:12:17 UTC (rev 39938)
+++ scummvm/trunk/engines/saga/interface.cpp	2009-04-11 20:16:37 UTC (rev 39939)
@@ -1437,6 +1437,8 @@
 			_optionPanel.calcPanelButtonRect(_optionSaveFileSlider, rect);
 
 			mouseY = mousePoint.y - rect.top -_optionSaveFileMouseOff;
+			if (mouseY < 0)
+				mouseY = 0;
 
 			if (totalFiles - visibleFiles <= 0) {
 				_optionSaveFileTop = 0;
@@ -1445,7 +1447,7 @@
 					(_optionSaveFileSlider->height - _optionSaveRectSlider.height());
 			}
 
-			_optionSaveFileTop = CLIP<uint>(_optionSaveFileTop, 0, _vm->getSaveFilesCount() - _vm->getDisplayInfo().optionSaveFileVisible);
+			_optionSaveFileTop = CLIP<uint>(_optionSaveFileTop, 0, totalFiles - visibleFiles);
 			calcOptionSaveSlider();
 		}
 	}


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