mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(anim): remove the redefinition of lv_anim_set_time (#7500)
This commit is contained in:
parent
738bda27f6
commit
29df86bef3
@ -361,11 +361,6 @@ void lv_anim_set_duration(lv_anim_t * a, uint32_t duration)
|
|||||||
a->duration = duration;
|
a->duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_anim_set_time(lv_anim_t * a, uint32_t duration)
|
|
||||||
{
|
|
||||||
lv_anim_set_duration(a, duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_anim_set_delay(lv_anim_t * a, uint32_t delay)
|
void lv_anim_set_delay(lv_anim_t * a, uint32_t delay)
|
||||||
{
|
{
|
||||||
a->act_time = -(int32_t)(delay);
|
a->act_time = -(int32_t)(delay);
|
||||||
|
@ -191,11 +191,6 @@ void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_xcb_t exec_cb);
|
|||||||
*/
|
*/
|
||||||
void lv_anim_set_duration(lv_anim_t * a, uint32_t duration);
|
void lv_anim_set_duration(lv_anim_t * a, uint32_t duration);
|
||||||
|
|
||||||
/**
|
|
||||||
* Legacy `lv_anim_set_time` API will be removed soon, use `lv_anim_set_duration` instead.
|
|
||||||
*/
|
|
||||||
void lv_anim_set_time(lv_anim_t * a, uint32_t duration);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a delay before starting the animation
|
* Set a delay before starting the animation
|
||||||
* @param a pointer to an initialized `lv_anim_t` variable
|
* @param a pointer to an initialized `lv_anim_t` variable
|
||||||
|
@ -252,7 +252,7 @@ def create_ui():
|
|||||||
a.set_var(btn1)
|
a.set_var(btn1)
|
||||||
a.set_values(lv.OPA.COVER, lv.OPA._50)
|
a.set_values(lv.OPA.COVER, lv.OPA._50)
|
||||||
a.set_custom_exec_cb(lambda _, v: opa_anim_cb(btn1, v)) # Pass a callback
|
a.set_custom_exec_cb(lambda _, v: opa_anim_cb(btn1, v)) # Pass a callback
|
||||||
a.set_time(300)
|
a.set_duration(300)
|
||||||
a.set_path_cb(lv.anim_t.path_ease_out)
|
a.set_path_cb(lv.anim_t.path_ease_out)
|
||||||
a.start()
|
a.start()
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ def create_ui():
|
|||||||
a.set_values(lv.OPA.COVER, lv.OPA._50)
|
a.set_values(lv.OPA.COVER, lv.OPA._50)
|
||||||
a.set_custom_exec_cb(lambda _, v: opa_anim_cb(btn4, v)) # Pass a callback
|
a.set_custom_exec_cb(lambda _, v: opa_anim_cb(btn4, v)) # Pass a callback
|
||||||
a.set_path_cb(lv.anim_t.path_ease_out)
|
a.set_path_cb(lv.anim_t.path_ease_out)
|
||||||
a.set_time(300)
|
a.set_duration(300)
|
||||||
a.set_repeat_count(lv.ANIM_REPEAT_INFINITE)
|
a.set_repeat_count(lv.ANIM_REPEAT_INFINITE)
|
||||||
a.start()
|
a.start()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user