BlinkCaret not functioning
Posted: Sun Jul 05, 2015 19:46
I tried using the BlinkCaret property on a <WidgetLook name="MyLookNFeel/Editbox"> element with CEGUI 0.8.4, but it didn't seem to apply. I tried adding a timeout and it still didn't work. I couldn't find a good answer as to why this wasn't working:
I ended up using an animation to get the same effect:
This did the trick, and albeit I can control the animation in a more precise manner, I wanted to try an leverage the build in functionality. Am I missing some basic assignment or element attribute to make the cursor blinker work?
Also the documentation here http://static.cegui.org.uk/docs/0.8/xml_animation.html lists the interpolator as "colour" but it appears to need the uppercase version: "Colour"
Code: Select all
<Property name="BlinkCaret" value="True"/>
<Property name="BlinkCaretTimeout" value="0.6"/>
I ended up using an animation to get the same effect:
Code: Select all
<AnimationDefinition name="CaretBlinker" duration="1.0" replayMode="loop">
<Affector property="CursorColour" interpolator="Colour">
<KeyFrame position="0.2" value="FFFFFFFF" />
<KeyFrame position="0.4" value="00FFFFFF" />
<KeyFrame position="0.6" value="00FFFFFF" />
<KeyFrame position="0.8" value="FFFFFFFF" />
</Affector>
<Subscription event="Activated" action="Start" />
<Subscription event="Deactivated" action="Stop" />
<Subscription event="Hidden" action="Stop" />
</AnimationDefinition>
This did the trick, and albeit I can control the animation in a more precise manner, I wanted to try an leverage the build in functionality. Am I missing some basic assignment or element attribute to make the cursor blinker work?
Also the documentation here http://static.cegui.org.uk/docs/0.8/xml_animation.html lists the interpolator as "colour" but it appears to need the uppercase version: "Colour"