BlinkCaret not functioning

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Pyrce
Just popping in
Just popping in
Posts: 12
Joined: Tue Jun 09, 2015 05:20

BlinkCaret not functioning

Postby Pyrce » 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:

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"

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: BlinkCaret not functioning

Postby Ident » Sun Jul 05, 2015 20:21

Docu fixed: https://bitbucket.org/cegui/cegui/commi ... 4b3698d991

Regarding BlinkCaret: no idea. Did you try it in a Sample of the SampleBrowser?
CrazyEddie: "I don't like GUIs"

Pyrce
Just popping in
Just popping in
Posts: 12
Joined: Tue Jun 09, 2015 05:20

Re: BlinkCaret not functioning

Postby Pyrce » Sun Jul 05, 2015 21:37

Yea I couldn't get any cursor to blink, but maybe I was applying the property in the wrong locations. The only cursor that blinks among the demos is the GameMenu printed text at the base of the app, which appears to just be dynamically generated as it prints and isn't an actual editable box. I tried putting the property into the Vanilla looknfeel to change the font demo without success.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: BlinkCaret not functioning

Postby Ident » Sun Jul 05, 2015 23:09

Will look at it tomorrow. I dont remember what I did in the GameMenu, could be an animation.
CrazyEddie: "I don't like GUIs"

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: BlinkCaret not functioning

Postby Ident » Wed Jul 08, 2015 21:42

I ran into some problems with other fixes. Tomorrow I will look into your problem (this time for real as now I dont have anything started )

Tomorrow is today. I tried it out and it worked right away:

Code: Select all

    CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(WindowManager::getSingleton().createWindow("TaharezLook/Editbox"));
    root->addChild(editbox);
    //This works right away without setting BlinkCaretTimeout
    editbox->setProperty("BlinkCaret", "True");
    // Also works
    editbox->setProperty("BlinkCaretTimeout", "0.2");

Did it in the HelloWorld sample.

Can you please try this out in the SampleBrowser and tell me if it works? Also if you find out what you did wrong please tell us what it was, maybe we can improve things so it wont happen to other people.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 36 guests