Exemplo n.º 1
0
        public override void OnMouseUp(object sender, MouseEventArgs args)
        {
            if(IsPressed)
                Clicked.Raise(this, args);

            IsPressed = false;
            base.OnMouseUp(sender, args);
        }
Exemplo n.º 2
0
        public override void OnMouseUp(object sender, MouseEventArgs args)
        {
            if (_isMouseDown)
                IsChecked = !IsChecked;

            _isMouseDown = false;
            base.OnMouseUp(sender, args);
        }
Exemplo n.º 3
0
        private void OnMouseMoved(object sender, MouseEventArgs args)
        {
            if (_focusedControl != null)
                _focusedControl.OnMouseLeave(this, args);

            _focusedControl = FindControlAtPoint(Layout, args.Position);

            if (_focusedControl != null)
                _focusedControl.OnMouseEnter(this, args);

            Layout.OnMouseMoved(this, args);
        }
Exemplo n.º 4
0
 public virtual void OnMouseEnter(object sender, MouseEventArgs args)
 {
     IsHovered = true;
 }
Exemplo n.º 5
0
 public virtual void OnMouseUp(object sender, MouseEventArgs args)
 {
     MouseUp.Raise(this, args);
 }
Exemplo n.º 6
0
 public virtual void OnMouseLeave(object sender, MouseEventArgs args)
 {
     IsHovered = false;
 }
Exemplo n.º 7
0
 public override void OnMouseDown(object sender, MouseEventArgs args)
 {
     _isMouseDown = true;
     base.OnMouseDown(sender, args);
 }
Exemplo n.º 8
0
 public override void OnMouseLeave(object sender, MouseEventArgs args)
 {
     _isMouseDown = false;
     base.OnMouseLeave(sender, args);
 }
Exemplo n.º 9
0
 private void DelegateMouseEvent(MouseEventArgs args, Action<GuiControl> action)
 {
     foreach (var control in Controls.Where(c => c.Contains(args.Position)))
         action(control);
 }
Exemplo n.º 10
0
 public override void OnMouseUp(object sender, MouseEventArgs args)
 {
     base.OnMouseUp(sender, args);
     ForEachChildAtPoint(args.Position, c => c.OnMouseUp(this, args));
 }
Exemplo n.º 11
0
Arquivo: Scr.cs Projeto: karv/Moggle
		protected void Bt_AlClick (object sender, MouseEventArgs e)
		{
			Debug.WriteLine (sender);
			Debug.WriteLine (e.Button);
		}
Exemplo n.º 12
0
Arquivo: Scr.cs Projeto: karv/Moggle
		void buttonClicked (MouseEventArgs e, int index)
		{
			Console.WriteLine ("botón [{0}] click: {1}", e, index);
			Console.WriteLine ("stringActual = {0}", StrListen.CurrentString);
		}
Exemplo n.º 13
0
Arquivo: DSBC.cs Projeto: karv/Moggle
		void check_click (object sender, MouseEventArgs e)
		{
			if (Enabled && GetBounds ().Contains (e.Position.ToVector2 ()))
				OnClick (e);
		}
Exemplo n.º 14
0
Arquivo: DSBC.cs Projeto: karv/Moggle
		/// <summary>
		/// This control was double clicked.
		/// </summary>
		protected virtual void OnDoubleClick (MouseEventArgs args)
		{
		}