diff options
author | Martin Kiewitz | 2016-03-23 23:49:01 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-03-23 23:49:01 +0100 |
commit | 184a448bb6f801223b2325205227063a7d754810 (patch) | |
tree | f5e8736ab5e4c0bfcc5edf90cd05b899f52f2953 | |
parent | 8161effc68e3853f4c92536ab06ed9736684f6bf (diff) | |
download | scummvm-rg350-184a448bb6f801223b2325205227063a7d754810.tar.gz scummvm-rg350-184a448bb6f801223b2325205227063a7d754810.tar.bz2 scummvm-rg350-184a448bb6f801223b2325205227063a7d754810.zip |
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.
-rw-r--r-- | engines/agi/text.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 0cacce2421..110ba10632 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) { |