PDA

View Full Version : Custom Viewport Tooltips


Swahn
12-14-2007, 01:22 AM
I found an old thread asking about this but it was locked due to age, so i'm posting a new one asking the same question.

Is it possible to make custom tooltips in the viewport, you know the textboxes showing the current object the cursor is hovering over e.g.
I've checked out viewport drawing methods like gw.text but it gives pretty poor results and are buggish at some points. The references doesn't mention anything about this either.

I have in mind adding a tooltip (or adding to the current if possible,) the material assigned to the object the cursor is hovering above.

Any help on this would be great :)

RustyKnight
12-16-2007, 02:02 AM
I found an old thread asking about this but it was locked due to age, so i'm posting a new one asking the same question.

Is it possible to make custom tooltips in the viewport, you know the textboxes showing the current object the cursor is hovering over e.g.
I've checked out viewport drawing methods like gw.text but it gives pretty poor results and are buggish at some points. The references doesn't mention anything about this either.

I have in mind adding a tooltip (or adding to the current if possible,) the material assigned to the object the cursor is hovering above.

Any help on this would be great :)The short answer I would say is...no...

You can take a look at the mouse tools and mouse tool clause in the docs and the mouse.pos/mouse.screenpos attributes.

The immediate issue I see is trying to determine which object is in view and under the mouse...I don't know the values returned from the mouse events, so it might not be entirly possible.

The next problem is how to do a popup. If you are using max 9+ you might be able to put together a dotnet window that might suffice.

But those are the ideas so far

Shane

Swahn
12-16-2007, 07:07 PM
Okay thanks. I'll see what i can do.

PEN
12-17-2007, 11:21 AM
I"m with shane that this is a pain, but I think that it can be done. All callback that is testing where the mouse is. From that you will have to do hit testing in the scene from the mouse position checking which objects you are over. I have used gw drawing to draw text to the screen, If you need some code to display text I can try and dig up what I have in my modeling tools for you. A real aoin over all.

Shane any idea if there is a dotNet dialog like that? I haven't run across anything but I also haven't been looking for it.

RustyKnight
12-17-2007, 09:20 PM
I"m with shane that this is a pain, but I think that it can be done. All callback that is testing where the mouse is. From that you will have to do hit testing in the scene from the mouse position checking which objects you are over. I have used gw drawing to draw text to the screen, If you need some code to display text I can try and dig up what I have in my modeling tools for you. A real aoin over all.

Shane any idea if there is a dotNet dialog like that? I haven't run across anything but I also haven't been looking for it.Well, the funny thing is, I have a greater understanding of the Java API then I do dot-net, so when I was trying to think of how to do it, I was thinking there might be a standard, non-decorated window of sorts that might be used to produce a "psydo" tooltip popup...then I scanned through the dotnet api and found....System.Window.Forms.ToolTip class!

It can't get easier then that...

Shane

PEN
12-18-2007, 12:32 AM
Perfect! I'll play with that and add it to my docs.

CGTalk Moderation
12-18-2007, 12:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.