public void Highlight(bool val) { // Set the variable to mark if this part is SUPPOSED to be hightlighted or not. this.highlighted = val; if (this.highlighted) { this.SetHighlighting(); // Set up an event handler to handle the mouse being moved away from this part while it is supposed to be being highlighted. Part.OnActionDelegate OnMouseExit = MouseExit; part.AddOnMouseExit(OnMouseExit); } else { // Remove the event handler that picks up on the mouse being moved away from the part when it is highlighted. Part.OnActionDelegate OnMouseExit = MouseExit; part.RemoveOnMouseExit(OnMouseExit); part.SetHighlightDefault(); this.part.SetHighlight(false); } }
public extern void RemoveOnMouseExit(Part.OnActionDelegate method);
public extern void AddOnMouseEnter(Part.OnActionDelegate method);