Skip to content

Commit

Permalink
Hide cursor on fast typing
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanJakobo committed Dec 26, 2022
1 parent 1648536 commit 6e89353
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ui/textView/textView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,16 @@ void TextView::handleKeyEvents(int eventID, const string &path)
}
if(key != 0)
{
Log::writeInfoLog("eventcode " + std::to_string(event.code) + " key " + std::to_string(key));
//Log::writeInfoLog("eventcode " + std::to_string(event.code) + " key " + std::to_string(key));
FillArea(_currentX,_currentY, _cursorThickness, _textHeight, WHITE);

_currentText += key;
int textWidth = drawChar(key);

FillArea(_currentX,_currentY, _cursorThickness,_textHeight, BLACK);
PartialUpdate(_currentX-textWidth,_currentY,textWidth+_cursorThickness,_textHeight);
//TODO when fast typing hide, otherwise show cursor
//FillArea(_currentX,_currentY, _cursorThickness,_textHeight, BLACK);
//PartialUpdate(_currentX-textWidth,_currentY,textWidth+_cursorThickness,_textHeight);
PartialUpdate(_currentX-textWidth,_currentY,textWidth,_textHeight);
}else{
//Message(1,"db",std::to_string(event.code).c_str(),1000);
}
Expand Down

0 comments on commit 6e89353

Please sign in to comment.