Skip to content

Commit

Permalink
AGI: Fix inaccurate predictive dialog trigger rect
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Martin Kiewitz committed Mar 23, 2016
1 parent 8161eff commit 184a448
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engines/agi/text.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 184a448

Please sign in to comment.