Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public extern void RemoveOnMouseExit(Part.OnActionDelegate method);
Exemplo n.º 3
0
 public extern void AddOnMouseEnter(Part.OnActionDelegate method);