Fix textbox key repeat issue
This commit is contained in:
parent
d45dd605e9
commit
34fdffa340
@ -283,6 +283,11 @@ bool Textbox::CharacterValid(Uint16 character)
|
|||||||
void Textbox::Tick(float dt)
|
void Textbox::Tick(float dt)
|
||||||
{
|
{
|
||||||
Label::Tick(dt);
|
Label::Tick(dt);
|
||||||
|
if(!IsFocused())
|
||||||
|
{
|
||||||
|
keyDown = 0;
|
||||||
|
characterDown = 0;
|
||||||
|
}
|
||||||
if((keyDown || characterDown) && repeatTime <= clock())
|
if((keyDown || characterDown) && repeatTime <= clock())
|
||||||
{
|
{
|
||||||
OnVKeyPress(keyDown, characterDown, false, false, false);
|
OnVKeyPress(keyDown, characterDown, false, false, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user