|
@@ -44,6 +44,12 @@ public:
|
|
|
/// Perform UI element update.
|
|
/// Perform UI element update.
|
|
|
void Update(float timeStep) override;
|
|
void Update(float timeStep) override;
|
|
|
|
|
|
|
|
|
|
+ /// Hide tooltip if visible and reset parentage.
|
|
|
|
|
+ void Reset();
|
|
|
|
|
+
|
|
|
|
|
+ /// Add an alternative hover target.
|
|
|
|
|
+ void AddAltTarget(UIElement* target);
|
|
|
|
|
+
|
|
|
/// Set the delay in seconds until the tooltip shows once hovering. Set zero to use the default from the UI subsystem.
|
|
/// Set the delay in seconds until the tooltip shows once hovering. Set zero to use the default from the UI subsystem.
|
|
|
void SetDelay(float delay);
|
|
void SetDelay(float delay);
|
|
|
|
|
|
|
@@ -53,10 +59,12 @@ public:
|
|
|
private:
|
|
private:
|
|
|
/// The element that is being tracked for hovering. Normally the parent element.
|
|
/// The element that is being tracked for hovering. Normally the parent element.
|
|
|
WeakPtr<UIElement> target_;
|
|
WeakPtr<UIElement> target_;
|
|
|
|
|
+ /// Alternative targets. Primarily targets parent.
|
|
|
|
|
+ Vector<WeakPtr<UIElement> > altTargets_;
|
|
|
/// Delay from hover start to displaying the tooltip.
|
|
/// Delay from hover start to displaying the tooltip.
|
|
|
float delay_;
|
|
float delay_;
|
|
|
- /// Point at which the parent was hovered.
|
|
|
|
|
- bool parentHovered_;
|
|
|
|
|
|
|
+ /// Hover countdown has started.
|
|
|
|
|
+ bool hovered_;
|
|
|
/// Point at which the tooltip was set visible.
|
|
/// Point at which the tooltip was set visible.
|
|
|
Timer displayAt_;
|
|
Timer displayAt_;
|
|
|
/// Original offset position to the parent.
|
|
/// Original offset position to the parent.
|