gbrainy.Core.Toolkit.Container.MouseEvent C# (CSharp) Méthode

MouseEvent() public méthode

public MouseEvent ( object obj, MouseEventArgs args ) : void
obj object
args MouseEventArgs
Résultat void
        public override void MouseEvent(object obj, MouseEventArgs args)
        {
            foreach (Widget child in Children)
            {
                if ((args.X >= child.X) && (args.X < child.X + child.Width) &&
                    (args.Y >= child.Y) && (args.Y < child.Y + child.Height))
                {
                    child.MouseEvent (this, args);
                } else {
                    child.MouseEvent (this, new MouseEventArgs (-1, -1, args.EventType));
                }
            }
        }