Ticket #9154: editalbe.cpp.patch

File editalbe.cpp.patch, 719 bytes (added by SF/vgvgf, 14 years ago)

Proposed 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 = (GUI::EditableWidget::String)_editString[_caretPos];
     255                        int chr_w = g_gui.getCharWidth(_editString[_caretPos], _font);
     256                        g_gui.theme()->drawText(Common::Rect(x, y, x + chr_w, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, 0, false, _font);
     257                }
     258        }
     259
    252260        _caretVisible = !erase;
    253261}
    254262