Hi. I'm trying to create tooltips for gameworld-entities. I do a raycast to recieve the entity, and then I figured I could use the Root-window's tooltip, and just change the text, depending on what entity it is. Then, after the mouse is moved I hide the tooltip, and after a second I make the raycast again and shows the tooltip if hovering an entity.
It works for the first entity I hover, but after that I have to hover the mouse over a different GUI-Window, and then back to Root in order to pick a new.
Is there any way into tricking CEGUI into showing the tooltip again?
Showing tooltips several times?
Moderators: CEGUI MVP, CEGUI Team
-
- Not too shy to talk
- Posts: 45
- Joined: Wed Sep 09, 2009 11:20
Re: Showing tooltips several times?
I don't understand your explanation. I think you are missing some verbs/nouns... :\
DisplayTime and HoverTime could be what you need?
Also, you can just manually position/hide a simple text window instead of a tooltip. For instance:
DisplayTime and HoverTime could be what you need?
Also, you can just manually position/hide a simple text window instead of a tooltip. For instance:
Code: Select all
<!--
***************************************************
textWithBackground
***************************************************
-->
<WidgetLook name="textWithBackground">
<PropertyDefinition name="normalTextColor" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="disabledTextColor" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="backgroundColor" initialValue="FF000000" redrawOnWrite="true" />
<PropertyDefinition name="borderColor" initialValue="FF8DA9B9" redrawOnWrite="true" />
<PropertyDefinition name="borderSize" initialValue="0" redrawOnWrite="true" />
<PropertyDefinition name="vertFormatting" initialValue="CenterAligned" redrawOnWrite="true" />
<PropertyDefinition name="horzFormatting" initialValue="CenterAligned" redrawOnWrite="true" />
<PropertyDefinition name="textOffsetX" initialValue="0" redrawOnWrite="true" />
<PropertyDefinition name="extraProperties" initialValue="" redrawOnWrite="true" />
<ImagerySection name="label">
<TextComponent>
<Area>
<Dim type="LeftEdge"><PropertyDim name="textOffsetX" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<VertFormatProperty name="vertFormatting" />
<HorzFormatProperty name="horzFormatting" />
</TextComponent>
</ImagerySection>
<ImagerySection name="background">
<FrameComponent>
<Area>
<Dim type="LeftEdge"><PropertyDim name="borderSize" /></Dim>
<Dim type="TopEdge"><PropertyDim name="borderSize" /></Dim>
<Dim type="Width"><UnifiedDim scale="1" type="Width">
<DimOperator op="Add"><AbsoluteDim value="-2">
<DimOperator op="Multiply"><PropertyDim name="borderSize" /></DimOperator>
</AbsoluteDim></DimOperator>
</UnifiedDim></Dim>
<Dim type="Height"><UnifiedDim scale="1" type="Height">
<DimOperator op="Add"><AbsoluteDim value="-2">
<DimOperator op="Multiply"><PropertyDim name="borderSize" /></DimOperator>
</AbsoluteDim></DimOperator>
</UnifiedDim></Dim>
</Area>
<Image imageset="TaharezLook" image="GenericBrush" />
<ColorProperty name="backgroundColor" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="backgroundBorder">
<FrameComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image imageset="TaharezLook" image="GenericBrush" />
<ColorProperty name="borderColor" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</FrameComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section section="backgroundBorder" />
<Section section="background" />
<Section section="label">
<ColorProperty name="normalTextColor" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="backgroundBorder" />
<Section section="background" />
<Section section="label">
<ColorProperty name="disabledTextColor" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Showing tooltips several times?
Nomonkeybusiness wrote:Is there any way into tricking CEGUI into showing the tooltip again?
Not tried it, but perhaps CEGUI::Tooltip::setTargetWindow passing 0 to clear the current target window?
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Not too shy to talk
- Posts: 45
- Joined: Wed Sep 09, 2009 11:20
Re: Showing tooltips several times?
CE: That worked fine. Thanks alot.
And I may have forgotten to say this, but thanks for an excellent GUI-library, what we're doing right now wouldn't be possible without CEGUI.
Keep it up
And I may have forgotten to say this, but thanks for an excellent GUI-library, what we're doing right now wouldn't be possible without CEGUI.
Keep it up

- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Showing tooltips several times?
Cool. I'm glad it worked. And I'm glad you're finding CEGUI useful 
CE.

CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 11 guests