GP4 sliding down a slope with events

I have an interface that receives data from an arduino and updates the sliders, charts and other indicators properly however what I was hoping to do is if I click on the slider and drag it it will pause the incoming serial communications until the value is set then send the new value to the arduino and resume the task of dealing with the spam coming in on the serial port.

I have all the relevant functions set up and it works with a button but it seems I can not find a way to capture the click event from the GP4 slider, the only event I seem to be able to get is the GEvent.VALUE_STEADY

As a work around I have just added a mouse click event to the entire interface but this is not overly ideal.

Does anyone know of a way to capture the click event on a slider?

Thanks in advance


  • Answer ✓

    If I remember correctly there is no click event for a slider because it is not a button. All sliders in G4P support easing to smooth out rapid dragging of the slider thumb. This means the slider value may lag behind the mouse position and will generate a value changing event until it catches up and the mouse button is released.

  • Thanks @quark. That was what I thought as well. think i may be stuck with the overall mouse event to handle the sending of the updates.

Sign In or Register to comment.