Пример #1
0
 private void HandleButtonPress(PointerEventDataArgs args)
 {
     if (this.Transform.Size.Contains(args.Position))
     {
         this.IsPressed = true;
     }
 }
Пример #2
0
 private void HandleButtonRelease(PointerEventDataArgs args)
 {
     if (this.IsPressed)
     {
         if (this.Transform.Size.Contains(args.Position))
         {
             this.IsPressed = false;
             this.OnPress?.Invoke(args);
         }
     }
 }