Button object, List object
I want to achieve this effect:
When I keep clicking on a button object with the mouse, if there is a moving position, do not update the click effect. I want to know if there is a good way to achieve this?
The code like this:
lv_obj_t *button = lv_btn_create(lv_scr_act(), NULL); lv_obj_align(button, NULL, LV_ALIGN_CENTER, 0, 0);
The state: pressed, clicked, pressing
a moving position:
lv_point_t vect; lv_indev_get_point(lv_indev_get_act(), &vect); bool moving_flag = (bool)(vect.x > 0 || vect.y > 0);
In other words, when move the position on the button, the style LV_BTN_STATE_PR is not refreshed, when click the button without moving, the style LV_BTN_STATE_PR is refreshed.
I am looking forward to your good ideas.