示例#1
0
 public bool MouseMove(Size backbufferSize, MouseEventArgs e)
 {
     if (capturedTick.HasValue)
     {
         //Rectangle bounds = new Rectangle(backbufferSize.Width - 330, 10, 300, 16);
         int y = capturedTick.Value.Y;
         Cinema.CinemaArgument argument = arguments[y];
         int x = (int)Math.Round((float)(e.Location.X - Bounds.X) * (float)(argument.values.Length + 1) / (float)Bounds.Width) - 1;
         if (x < 0)
         {
             x = 0;
         }
         else if (x >= argument.values.Length)
         {
             x = argument.values.Length - 1;
         }
         if (x != capturedTick.Value.X)
         {
             /*if(InputDevices.kbstate.IsKeyUp(OpenTK.Input.Key.LControl))
              *      selection[y].Clear();
              * selection[y].Add(x);
              * if(SelectionChanged != null)
              *      SelectionChanged(selection);*/
         }
     }
     return(false);
 }
示例#2
0
 public TrackBar(Cinema.CinemaArgument argument, int argidx, GLMesh meshBorders, GLMesh meshTick, GLMesh meshSelection)
 {
     this.argument      = argument;
     this.argidx        = argidx;
     this.meshBorders   = meshBorders;
     this.meshTick      = meshTick;
     this.meshSelection = meshSelection;
 }