As much as I dislike taking up space on the front page with my two posts, I didn't want to lose all my motivation tonight, so I figured I'd bundle this up as a demo, seen as
Koil doesn't seem to mind.
[edit: oh, hey, it doesn't take up space on the front page. yay!]
A bit more about the tooltips: they're
very extensible. You can control whether they fade out, how big they are (well, yeah), and then control them right down to the CSS (
sandbox,
what is css?) that they contain. It's pretty cool!
The tooltips were mentioned in my
previous post, related to my upcoming game,
Mantra.
A few people had asked me via several mediums if I would release it, and I guess, the only reason I'd held it back was because of Koil. Go on, thank Koil now. :P
However, there seems to be quite a delay before the tooltips appear. I see some sleep(10)s in the code which probably explain the delay, what are they for?
Also, is it essential to call update_mouse() each time? You can use the output() proc to invoke JavaScript functions so you can output the JavaScript containing the coordinate() function to the browser once then merely invoke it when you need to get the coordinates.