private static void CheckButton(HoverButton button, Ellipse thumbStick) { if (IsItemMidpointInContainer(button, thumbStick)) { button.Hovering(); } else { button.Release(); } }
private static void OnButtonLocationChanged(HoverButton hand, List<Button> buttons, int X, int Y) { if (IsButtonOverObject(hand, buttons)) hand.Hovering(); else hand.Release(); Canvas.SetLeft(hand, X - (hand.ActualWidth / 2)); Canvas.SetTop(hand, Y - (hand.ActualHeight / 2)); }
//at least one hand touches private void CheckButton(HoverButton button) { if (button.ImageSource != "") //can't select items that aren't there { if (IsItemMidpointInContainer(button, rightEllipse) || IsItemMidpointInContainer(button, leftEllipse)) { button.Hovering(); } else { button.Release(); } } }