[Scummvm-cvs-logs] scummvm master -> f6c3363cf54af1c01efc12a98ab27a8af52aad3e

sev- sev at scummvm.org
Sun Mar 20 17:38:24 CET 2016


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:
40faac8419 WAGE: Restrict text scrolling to the visible text
f6c3363cf5 WAGE: Adjust cursor position when scrolling


Commit: 40faac84195743e1eb2fef9c55920fac94909c4e
    https://github.com/scummvm/scummvm/commit/40faac84195743e1eb2fef9c55920fac94909c4e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-20T17:38:23+01:00

Commit Message:
WAGE: Restrict text scrolling to the visible text

Changed paths:
    engines/wage/gui.cpp



diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 4af5bea..db19350 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -591,12 +591,14 @@ Designed *Gui::mouseUp(int x, int y) {
 
 		switch (borderClick) {
 			case kBorderScrollUp:
-				_scrollPos--;
+				_scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight);
 				_consoleDirty = true;
+				_consoleFullRedraw = true;
 				break;
 			case kBorderScrollDown:
-				_scrollPos++;
+				_scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight);
 				_consoleDirty = true;
+				_consoleFullRedraw = true;
 				break;
 		}
 	}


Commit: f6c3363cf54af1c01efc12a98ab27a8af52aad3e
    https://github.com/scummvm/scummvm/commit/f6c3363cf54af1c01efc12a98ab27a8af52aad3e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-20T17:38:23+01:00

Commit Message:
WAGE: Adjust cursor position when scrolling

Changed paths:
    engines/wage/gui.cpp



diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index db19350..9dd1a24 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -588,15 +588,20 @@ Designed *Gui::mouseUp(int x, int y) {
 		}
 	} else if ((borderClick = isInBorder(_consoleTextArea, x, y)) != kBorderNone) {
 		_bordersDirty = true;
+		int _oldScrollPos = _scrollPos;
 
 		switch (borderClick) {
 			case kBorderScrollUp:
 				_scrollPos = MAX<int>(0, _scrollPos - _consoleLineHeight);
+				undrawCursor();
+				_cursorY -= (_scrollPos - _oldScrollPos);
 				_consoleDirty = true;
 				_consoleFullRedraw = true;
 				break;
 			case kBorderScrollDown:
 				_scrollPos = MIN<int>((_lines.size() - 2) * _consoleLineHeight, _scrollPos + _consoleLineHeight);
+				undrawCursor();
+				_cursorY -= (_scrollPos - _oldScrollPos);
 				_consoleDirty = true;
 				_consoleFullRedraw = true;
 				break;






More information about the Scummvm-git-logs mailing list