TangentFoxy / Pop.Box

(ON HOLD) Pop.Box is an easy to use GUI library for the LÖVE engine, intended for rapid prototyping.
http://guard13007.github.io/Pop.Box/docs
MIT License
8 stars 4 forks source link

Implement a tooltip feature, drawing a customizable element outside of the standard tree of elements #55

Open TangentFoxy opened 7 years ago

TangentFoxy commented 7 years ago

Inspired by the fact that I had to implement and position my own such feature for SCP Clicker. It'd be nice if the library handled positioning and potential problems automatically, but exposed the internals of the tooltip feature to customization.

Basically, the tooltip will check whatever is pop.hovered every frame, and only when something exists, create and move itself to the appropriate position. When pop.hovered does not contain a tooltip data item, it does nothing.

Not quite sure how I will allow customization, that will have to be implemented after I make something that is customizing it. (I imagine it is as simple as accessing pop.tooltip.data and modifying it.)

TangentFoxy commented 7 years ago

Note that a tooltip will always linger as currently implemented if the item is destroyed beneath it and it is not moved, as it is only listening to mousemoved events.

TangentFoxy commented 7 years ago

See Guard13007/SCP-Clicker#2

TangentFoxy commented 7 years ago

Relevant notes from linked issue: