Ticket #9154: editable.cpp.patch

File editable.cpp.patch, 709 bytes (added by SF/vgvgf, 15 years ago)

Improved patch for bug #2951681

  • editable.cpp

     
    249249
    250250        g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height() - 2), erase);
    251251
     252        if (erase) {
     253                if ((unsigned int)_caretPos < _editString.size()) {
     254                        GUI::EditableWidget::String chr(_editString[_caretPos]);
     255                        int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font);
     256                        g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, 0, false, _font);
     257                }
     258        }
     259
    252260        _caretVisible = !erase;
    253261}
    254262