CEGUI::System::getSingleton().injectTimePulse(evt.timeSinceLastFrame)
in function:frameRenderingQueued().
And i have got it initialised in my init():
CEGUI::System::getSingleton().setDefaultTooltip ("GuiLook/Tooltip")
And then i loaded the FoneDemo.layout in order to test the effect of the tooltip.I modified the tooltip text of some widgets .But when i run the app,nothing happened when the mouse was on them.
Here is the defination of my tooltip:
Code: Select all
***************************************************
GuiLook/Tooltip
***************************************************
-->
<WidgetLook name="GuiLook/Tooltip">
<NamedArea name="TextArea">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="GuiLook" image="TooltipLeftEdge" dimension="Width" /></Dim>
<Dim type="TopEdge" ><ImageDim imageset="GuiLook" image="TooltipTopEdge" dimension="Height" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="GuiLook" image="TooltipRightEdge" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="GuiLook" image="TooltipBottomEdge" dimension="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<ImagerySection name="main">
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="20" /></Dim>
<Dim type="TopEdge" ><UnifiedDim scale="-1" type="Height" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image type="TopLeftCorner" imageset="GuiLook" image="TooltipTopLeft" />
<Image type="TopRightCorner" imageset="GuiLook" image="TooltipTopRight" />
<Image type="BottomLeftCorner" imageset="GuiLook" image="TooltipBottomLeft" />
<Image type="BottomRightCorner" imageset="GuiLook" image="TooltipBottomRight" />
<Image type="LeftEdge" imageset="GuiLook" image="TooltipLeftEdge" />
<Image type="RightEdge" imageset="GuiLook" image="TooltipRightEdge" />
<Image type="TopEdge" imageset="GuiLook" image="TooltipTopEdge" />
<Image type="BottomEdge" imageset="GuiLook" image="TooltipBottomEdge" />
<Image type="Background" imageset="GuiLook" image="TooltipMiddle" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="label">
<TextComponent>
<Area>
<Dim type="LeftEdge" >
<ImageDim imageset="GuiLook" image="TooltipLeftEdge" dimension="Width" />
<DimOperator op="Add">
<AbsoluteDim value="20" />
</DimOperator>
</Dim>
<Dim type="TopEdge" >
<DimOperator op="Add">
<UnifiedDim scale="-1" type="Height" />
</DimOperator>
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="GuiLook" image="TooltipRightEdge" dimension="Width" />
</DimOperator>
<DimOperator op="Add">
<AbsoluteDim value="20" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="GuiLook" image="TooltipBottomEdge" dimension="Height" />
</DimOperator>
<DimOperator op="Add">
<UnifiedDim scale="-1" type="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
<Colours topLeft="FFFFFFFF" topRight="FFFFFFFF" bottomLeft="FFFFFFFF" bottomRight="FFFFFFFF" />
<VertFormat type="CentreAligned" />
<HorzFormat type="CentreAligned" />
</TextComponent>
</ImagerySection>
<StateImagery name="Enabled" clipped = "false">
<Layer>
<Section section="main" />
<Section section="label" />
</Layer>
</StateImagery>
<StateImagery name="Disabled" clipped = "false">
<Layer>
<Section section="main" />
<Section section="label" />
</Layer>
</StateImagery>
</WidgetLook>
In my .scheme
Code: Select all
<FalagardMapping WindowType="GuiLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="GuiLook/Tooltip" />
My environment is:Ogre 1.7.3 and 0.7.5 for CEGUI.Thank you all