Notifications
Clear all

[Closed] Custom Viewport Tooltips

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

5 Replies

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

Okay thanks. I’ll see what i can do.

 PEN

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.

1 Reply
(@rustyknight)
Joined: 11 months ago

Posts: 0

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

Perfect! I’ll play with that and add it to my docs.