Пример #1
0
 public Mouse() : base()
 {
     speed             = 0;
     mouseEyeDirection = 0;
     random            = new Random();
     color             = new QColor(random.Next(255), random.Next(255), random.Next(255));
     timer             = new MouseTimer(this);
     Rotate(random.Next(360 * 16));
 }
Пример #2
0
Файл: mouse.cs Проект: KDE/qyoto
 public Mouse()
     : base()
 {
     speed = 0;
     mouseEyeDirection = 0;
     random = new Random();
     color = new QColor(random.Next(255), random.Next(255), random.Next(255));
     timer = new MouseTimer(this);
     Rotate(random.Next(360 * 16));
 }
Пример #3
0
 private void MouseTrack_Click(object sender, EventArgs e)
 {
     TrackingPanel.Width  = this.Width;
     TrackingPanel.Height = this.ClientRectangle.Height;
     TrackingPanel.Top    = this.Top;
     TrackingPanel.Left   = this.Left;
     Output.Text          = "qwe";
     MouseTimer.Tick     += (s, ev) =>
     {
         Output.Text = (new Random()).Next(1000).ToString();
         DrawSquare(MousePosition.X, MousePosition.Y, Brushes.BlueViolet, 7);
     };
     TrackingPanel.Invalidate();
     MouseTimer.Start();
     MouseTimer.Enabled = true;
 }
Пример #4
0
        public ImageFrame GetSpecialFrame(MousePointer key)
        {
            MouseTimer.Update(DwarfTime.LastTime);

            if (key == MousePointer.Wait)
            {
                Point frame = MouseFrames[key];

                if (MouseTimer.HasTriggered)
                {
                    WaitIndex = (WaitIndex + 1) % 6;
                }

                frame.X += WaitIndex;
                return(GetMouseFrame(frame));
            }
            else
            {
                return(GetMouseFrame(MouseFrames[key]));
            }
        }