public CheckBar(Cinema.CinemaStore.Parameter parameter, GLMesh meshBorders, GLMesh meshTick, GLMesh meshCheck) { this.parameter = parameter; this.meshBorders = meshBorders; this.meshTick = meshTick; this.meshCheck = meshCheck; }
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.CinemaStore.Parameter parameter = parameters[y]; int x = (int)Math.Round((float)(e.Location.X - bounds.X) * (float)(parameter.values.Length + 1) / (float)bounds.Width) - 1; if (x < 0) { x = 0; } else if (x >= parameter.values.Length) { x = parameter.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); }