コード例 #1
0
        public OrbKeyboard()
        {
            InitializeComponent();

            AllOrbs = new OnScreenKeyboardOrb[] { top, topRight, right, bottomRight, bottom, bottomLeft, left, topLeft };
            AllArrows = new Path[] { arrowT, arrowTR, arrowR, arrowBR, arrowB, arrowBL, arrowL, arrowTL };

            foreach (var o in AllOrbs) o.Visibility = System.Windows.Visibility.Hidden;
            balltop.Visibility = System.Windows.Visibility.Hidden;
            //!centerImg.Visibility = Visibility.Hidden;
        }
コード例 #2
0
        private void PositionOrb(OnScreenKeyboardOrb orb, Point center, double angle, double radius, bool actuallyMoveOrbToNewPos)
        {
            var pnt = Util.CalcPointOnCircle(center, radius, angle);

            pnt.X -= orb.Width / 2.0;
            pnt.Y -= orb.Height / 2.0;

            orb.Tag = pnt;

            if (actuallyMoveOrbToNewPos)
            {
                CanvasEx.SetPosition(orb, pnt, 100); // TODO: zIndex!
            }
        }