refactor: scr -> screen, act->active, del->delete, remove in obj_clear_flag/state
This commit is contained in:
@@ -11,7 +11,7 @@ static void event_handler(lv_event_t * e)
|
||||
|
||||
void lv_example_win_1(void)
|
||||
{
|
||||
lv_obj_t * win = lv_win_create(lv_scr_act());
|
||||
lv_obj_t * win = lv_win_create(lv_screen_active());
|
||||
lv_obj_t * btn;
|
||||
btn = lv_win_add_button(win, LV_SYMBOL_LEFT, 40);
|
||||
lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
||||
@@ -5,7 +5,7 @@ def event_handler(e):
|
||||
print("Button {:d} clicked".format(obj.get_index()))
|
||||
|
||||
|
||||
win = lv.win(lv.scr_act())
|
||||
win = lv.win(lv.screen_active())
|
||||
button1 = win.add_button(lv.SYMBOL.LEFT, 40)
|
||||
button1.add_event(event_handler, lv.EVENT.ALL, None)
|
||||
win.add_title("A title")
|
||||
|
||||
Reference in New Issue
Block a user