urho3d/Urho3D — pull request #91 by alexparlett (2013-12-28 21:59:31+00:00)
Title: Add a Tooltip UI Element

Adds a tooltip UI Element which is used in the following way (from the editor (#61 commit later possibly)):

Tooltip@ tooltip = Tooltip("Tooltip");
toolBar.opacity = uiMaxOpacity;

Text@ text = Text();
text.SetFont(font, 11);
text.color = Color(0,255,0);
text.text = tooltiptext;

BorderImage@ background = BorderImage();
background.style = "EditorMenuBar";
background.opacity = 100;
background.size = text.size;
background.color = Color(0,0,0);

tooltip.AddChild(background);
tooltip.AddChild(text);

element.AddChild(tooltip);

Which produces this:

![image](https://f.cloud.github.com/assets/2347963/1818523/d8209490-700a-11e3-92a3-2014b106ed84.png)

It work's off its parent element being hovered over and then displaying when the delay is reached.

There might be a slight issue with this though due to BringToFront not working as expected (I think im missing something there) in that it is still behind some elements in my editor test.

![image](https://f.cloud.github.com/assets/2347963/1818524/fed64cce-700a-11e3-987c-6feb96a7582c.png)