Advertisement

Tool Tip with OGL and loadname - help!!

Started by February 09, 2004 08:10 AM
0 comments, last by leggyguy 21 years, 1 month ago
Hi, I have a baseball game project I am working on, and it is going really well. I am using the loadname technique for recognising clicks on items. And it is running great. I think it would be nice, though not absolutely necessary, to have a pop up that comes on after say a second, that describes the object being hovered over. But I am wondering if anyone has ever done this? More than likely someone has. I think what I need to do is check each frame if the mouse has been stationary for 1 second, and if so do the pop up, but I am wondering how I would go about doing this check for a stationary for 1 second mouse. I think I can come up with a messy way of doing it if I sit down tonight and figure it out, but if anyone has done something similar, I would appreciate your input.
I''m presuming you know how to use the feedback buffer (if not, check out Nehe''s tutorials - I think there was one on this topic). After you have rendered all of the objects that can give you feedback (objects with names), you check when 1 second (elaborately called "tooltip delay time") has elapsed, and then display your object''s name, status or whetever.

If you''re using orthogonal projection, taking advantage of WinApi''s built-in object structures (not classes!), namely the TOOLTIP structure, might be easier and less messy.

If you''re having trouble understanding what I just said, let me know and I''ll do my best to elaborate.



"Finishing in second place, simply means you are the first loser." - PouyaCat

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

This topic is closed to new replies.

Advertisement