Only animate when textbox has focus.

This commit is contained in:
Sander Schobers 2020-05-17 15:31:06 +02:00
parent 8560204c39
commit 0c399a8d93

View File

@ -138,7 +138,9 @@ func (b *TextBox) Handle(ctx Context, e Event) bool {
}
ctx.Renderer().SetMouseCursor(MouseCursorText)
}
ctx.Animate()
if b.Focus {
ctx.Animate()
}
switch e := e.(type) {
case *MouseButtonDownEvent: