From 2545ffd07495deccf72109d80744089e403f04d2 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Thu, 24 Aug 2017 15:23:53 +0200 Subject: SUPERNOVA: Fixes overdraw of input --- engines/supernova/state.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 3ce044e56c..7f62852911 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -980,8 +980,9 @@ void GameManager::animationOn() { void GameManager::edit(Common::String &input, int x, int y, uint length) { bool isEditing = true; uint cursorIndex = input.size(); - int overdrawWidth = ((length + 1) * kFontWidth > kScreenWidth - x) ? - kScreenWidth - x : (length + 1) * kFontWidth; + // NOTE: Pixels for char needed = kFontWidth + 2px left and right side bearing + int overdrawWidth = ((length + 1) * (kFontWidth + 2) > kScreenWidth - x) ? + kScreenWidth - x : (length + 1) * (kFontWidth + 2); while (isEditing) { _vm->_textCursorX = x; -- cgit v1.2.3