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); }
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; }
public void Remove(OpenGLComponent component) { lock (this.components) { this.components.Remove(component); } }
public void Add(OpenGLComponent component) { lock (this.components) { this.components.Add(component); } }
public void Remove(OpenGLComponent component) { lock(this.components) { this.components.Remove(component); } }
public void Add(OpenGLComponent component) { lock(this.components) { this.components.Add(component); } }