Page 1 of 1

Carat blinking

Posted: Mon Sep 01, 2008 14:24
by dewyatt
This has been asked before, but there was no answer.
Is it possible to make the carat of an editbox blink?
If this can't be done right now, I know it wouldn't be hard to add it (since CEGUI receives time pulses).

Posted: Mon Sep 01, 2008 22:33
by Liberator
This would require more dynamic rendering instead of the cached frames CEGUI uses. This could be implemented by using a second render pass to render the dynamic elements as I posted before somewhere on this forum.

Posted: Tue Sep 02, 2008 01:10
by dewyatt
Aw, more work than I thought.
I'll probably just live without it. :)

Posted: Tue Sep 02, 2008 19:17
by Jamarr
This should probably be added as a feature request in mantis, as a blinking cursor is pratically always desired for an editbox.

I'm not sure when the EventRenderingStarted event is fired, nor do I know how/if the cursor rendering is cached, but if that event is fired per frame and the cursor rendering is cached separate from the editbox, you could probably just add an elapsed_time member/property to the object and inside the event handler change the visibility state of the cursor every half second or so.

Posted: Sun Sep 07, 2008 19:07
by dewyatt

Posted: Mon Sep 08, 2008 09:01
by CrazyEddie
Thanks :)