Jump to content

How do I turn on edge highlighting for a part?


Recommended Posts

(this has also been posted in the 'The official unoffical "help a fellow plugin developer" thread' for visibility

So I'm trying to turn on edge highlighting on a part when it's hovered over in a list (as shown in the screenshots) and I sort of have it working but not completely. When you hover over a part normally and it highlights green, it has very bright edge highlighting and can be seen through objects but if you look at what it looks like when I turn on the highlight with my plugin, it is like the old highlight method which is not as bright and not really visible through objects.

Here is the relevant code and some screenshots

if (hovercheck.Contains(Event.current.mousePosition))
{
	part.SetHighlightColor(Color.cyan);
	part.SetHighlight(true, false);
	part.highlightType = Part.HighlightType.AlwaysOn;
	part.gameObject.GetComponent<ExplosionDetector>().highlightPart = true;      
}
else if (part.gameObject.GetComponent<ExplosionDetector>().highlightPart == true)
{
	part.SetHighlightColor(Part.defaultHighlightPart);
	part.SetHighlight(false, false);
	part.highlightType = Part.HighlightType.OnMouseOver;
	part.gameObject.GetComponent<ExplosionDetector>().highlightPart = false;
}

Here is what it looks like when you hover over the part

DxHYjPW.png

Here is what my plugin looks like

N0uJwDC.png

Thanks :)

Edited by JoePatrick1
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...