...
Constructor
Variables
autoFlipAnchor:Bool = true
Turn on flipping the anchor position around in order to keep a tooltip on screen
fixedPosition:{object:FlxObject, anchor:Anchor} = null
Optional fixed position to use for ALL tooltips
2.1.0
.Methods
add(thing:FlxObject, data:FlxUITooltipData):Void
Adds a tooltip for this object, using the specified data. NOTE: if thing does not implement IFlxUIButton, a new invisible button will be created for it in order to drive tooltips.
Parameters:
thing | The object you want to add a tooltip to. |
---|---|
null | data |
doesCurrentTooltipBelongTo(thing:FlxSprite, checkChildren:Bool = true):Bool
Checks whether the currently shown tooltip belongs to a given FlxSprite, or optionally, any of its children (if it is a FlxUIGroup or FlxUI) @return
Parameters:
thing | the FlxSprite to check |
---|---|
checkChildren | whether or not to check its children (default: true) |
enableTooltipFor(thing:FlxObject, enabled:Bool):Bool
Allows you to turn tooltips on or off for an object that has already been added
Parameters:
thing | The object you want to turn tooltips on or off for |
---|---|
b | On or off |
Returns:
true if the object was found and the property set, false if the object has not been added to the tooltip manager
remove(thing:FlxObject):Void
Remove a tooltip associated with this object, if there is one
Parameters:
null | thing |
---|
showTooltipFor(thing:FlxObject, value:Bool = true):Void
Show the tooltip for the given object, if one exists
Parameters:
thing | the thing you want to display a tooltip for |
---|---|
value | whether to show or hide the tooltip |
2.1.0
.stickyTooltipFor(thing:FlxObject, sticky:Bool = true):Void
Set an object's tooltip's stickiness (whether it disappears when the mouse moves off of it or not)
Parameters:
thing | the thing you want to modify the tooltip for |
---|---|
sticky | if true, this tooltip will not disappear until explicitly hidden or until another tooltip is triggered |
2.1.0
.