Ejemplo n.º 1
0
        public override void OnMouseClick(UIMouseClickEventArgs args)
        {
            if (_backgroundRect.Transform.HitTest(args.X, args.Y))
            {
                var buttonEventArgs = new UIButtonEventArgs(args.X, args.Y, args.X - (int)_backgroundRect.Transform.Position.X, args.Y - (int)_backgroundRect.Transform.Position.Y);
                var handler         = OnClick;

                handler?.Invoke(this, buttonEventArgs);
            }
        }
Ejemplo n.º 2
0
 private void TestButtonOnOnClick(object sender, UIButtonEventArgs e)
 {
     Console.WriteLine("Test button clicked. It works!");
 }