cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat Button Implementation

Jtron.11
Senior

Dear all,

Can you please help to point me to any of the repeat button implementation example?

I have successfully implement the single button with plus and minus but the number target is too big and it is taking too many clicks to get to the target number.  I would like to use the repeat button feature to achieve the goal that if the repeat button is holding, the setting will go faster and reach the goal.

1 REPLY 1
MM..1
Chief III

Try search Long press

void Screen3View::handleClickEvent(const ClickEvent& evt)
{
  if(evt.getType()==ClickEvent::PRESSED && flexButton1.getAbsoluteRect().intersect(evt.getX(), evt.getY()))
  {
    evaluate_long_press = 1;
  }
  else if(evt.getType()==ClickEvent::RELEASED)
  {
    evaluate_long_press = 0;
  }
  Screen3ViewBase::handleClickEvent( evt);
}