Jump to content

Closing the RevealPart Window


Recommended Posts

I have a label in the editor, and when the mouse is placed over this button, the part details window you see on hovering over a part in the parts panel is displayed. However, I can't seem to get rid of that window after opening it without a mouseclick input from the user (setting the revealTooltip bool false hasn't had any impact so far).

Any ideas on how to close the window created by the function EditorPartList.Instance.RevealPart(AvailablePart part, bool revealTooltip)?

Semi-Psuedocode of what I've been trying to do


if (label.hover() && part == null) // Only need to open it once
{
RevealPart(revealedPart, true)
part = revealedPart
}
else if (part != null) // Only need to close it once
{
RevealPart(part, false)
part = null
}

Edited by Crzyrndm
Link to comment
Share on other sites

Well looking in the correct object certainly helps alot, but oh boy, all the display bugs...

The hide tooltip function works (tyvm), but it seems to have exposed an underlying flaw in how my GUI is being created. Somehow it ended up being drawn inside the tooltip on occasion and the log has atleast 2 different exceptions to track down (*sigh*). Hopefully not something to do with the lack of an editorPartIcon to use as an argument.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...