Fix textbox key repeat issue

This commit is contained in:
Simon Robertshaw 2012-10-05 15:23:01 +01:00
parent d45dd605e9
commit 34fdffa340

View File

@ -283,6 +283,11 @@ bool Textbox::CharacterValid(Uint16 character)
void Textbox::Tick(float dt)
{
Label::Tick(dt);
if(!IsFocused())
{
keyDown = 0;
characterDown = 0;
}
if((keyDown || characterDown) && repeatTime <= clock())
{
OnVKeyPress(keyDown, characterDown, false, false, false);