[Scummvm-cvs-logs] scummvm master -> 184a448bb6f801223b2325205227063a7d754810

m-kiewitz m_kiewitz at users.sourceforge.net
Wed Mar 23 23:49:10 CET 2016


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:
184a448bb6 AGI: Fix inaccurate predictive dialog trigger rect


Commit: 184a448bb6f801223b2325205227063a7d754810
    https://github.com/scummvm/scummvm/commit/184a448bb6f801223b2325205227063a7d754810
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-03-23T23:49:01+01:00

Commit Message:
AGI: Fix inaccurate predictive dialog trigger rect

Trigger rect is the rect, that the user needs to click to
trigger the predictive dialog.

Previously cursor char got drawn, rect started right afterwards
In case cursor char is enabled, the rect will get adjusted
accordingly now.

Changed paths:
    engines/agi/text.cpp



diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 0cacce2..110ba10 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -885,6 +885,12 @@ void TextMgr::stringEdit(int16 stringMaxLen) {
 	_inputStringRow = _textPos.row;
 	_inputStringColumn = _textPos.column;
 
+	if (_inputCursorChar) {
+		// Cursor character is shown, which means we are one beyond the start of the input
+		// Adjust the column for predictive input dialog
+		_inputStringColumn--;
+	}
+
 	// Caller can set the input string
 	_inputStringCursorPos = 0;
 	while (_inputStringCursorPos < inputStringLen) {






More information about the Scummvm-git-logs mailing list