Current BGA API recommends to create static tooltips, i.e. all tooltip text statically assigned
to all element that you want to have tooltips, moreover BGA UI guidelines document tells us not to use
dynamic tooltips.
However even standard "tooltip action" depends of current state. i.e. sometime for same card it is 'click to buy', sometimes 'click to discard", sometime 'click to play'.
Moreover in some cases it nice to show lets say how many squares between your meeple and selected location, and I have
like 100 of locations. Currently I have to query and update all of these 100 tips on very meeple move. What I would
like is to just register a "hover" handler on element, and handler dynamically calculate tooltip, this way no need to store tons of html
snippets, and re-calculate on every move.
I suppose I can use PlainJS, but I was wondering if we have something already made in framework for that.
to all element that you want to have tooltips, moreover BGA UI guidelines document tells us not to use
dynamic tooltips.
However even standard "tooltip action" depends of current state. i.e. sometime for same card it is 'click to buy', sometimes 'click to discard", sometime 'click to play'.
Moreover in some cases it nice to show lets say how many squares between your meeple and selected location, and I have
like 100 of locations. Currently I have to query and update all of these 100 tips on very meeple move. What I would
like is to just register a "hover" handler on element, and handler dynamically calculate tooltip, this way no need to store tons of html
snippets, and re-calculate on every move.
I suppose I can use PlainJS, but I was wondering if we have something already made in framework for that.