예제 #1
0
        public bool OnMouseMove(MouseMoveEventArgs e)
        {
            Point p = e.Position;

            if (this.hover != null)
            {
                if (this.hover.Bounds.Contains(p))
                {
                    this.hover.OnMouseMove(p - (Size)this.hover.Bounds.Location);
                    return(true);
                }
            }
            foreach (OpenGLComponent oglc in this.components)
            {
                if (oglc.Bounds.Contains(p))
                {
                    if (this.hover != null)
                    {
                        this.hover.OnMouseLeave();
                    }
                    this.hover = oglc;
                    this.hover.OnMouseEnter();
                    return(true);
                }
            }
            if (this.hover != null)
            {
                this.hover.OnMouseLeave();
            }
            this.hover = null;
            return(false);
        }
예제 #2
0
 public bool OnMouseMove(MouseMoveEventArgs e)
 {
     Point p = e.Position;
     if(this.hover != null) {
         if(this.hover.Bounds.Contains(p)) {
             this.hover.OnMouseMove(p-(Size) this.hover.Bounds.Location);
             return true;
         }
     }
     foreach(OpenGLComponent oglc in this.components) {
         if(oglc.Bounds.Contains(p)) {
             if(this.hover != null) {
                 this.hover.OnMouseLeave();
             }
             this.hover = oglc;
             this.hover.OnMouseEnter();
             return true;
         }
     }
     if(this.hover != null) {
         this.hover.OnMouseLeave();
     }
     this.hover = null;
     return false;
 }
예제 #3
0
 public void Remove(OpenGLComponent component)
 {
     lock (this.components) {
         this.components.Remove(component);
     }
 }
예제 #4
0
 public void Add(OpenGLComponent component)
 {
     lock (this.components) {
         this.components.Add(component);
     }
 }
예제 #5
0
 public void Remove(OpenGLComponent component)
 {
     lock(this.components) {
         this.components.Remove(component);
     }
 }
예제 #6
0
 public void Add(OpenGLComponent component)
 {
     lock(this.components) {
         this.components.Add(component);
     }
 }