refactor: scr -> screen, act->active, del->delete, remove in obj_clear_flag/state
This commit is contained in:
@@ -12,7 +12,7 @@ def ta_event_cb(e):
|
||||
|
||||
# Create the password box
|
||||
|
||||
pwd_ta = lv.textarea(lv.scr_act())
|
||||
pwd_ta = lv.textarea(lv.screen_active())
|
||||
pwd_ta.set_text("")
|
||||
pwd_ta.set_password_mode(True)
|
||||
pwd_ta.set_one_line(True)
|
||||
@@ -21,12 +21,12 @@ pwd_ta.set_pos(5, 20)
|
||||
pwd_ta.add_event(ta_event_cb, lv.EVENT.ALL, None)
|
||||
|
||||
# Create a label and position it above the text box
|
||||
pwd_label = lv.label(lv.scr_act())
|
||||
pwd_label = lv.label(lv.screen_active())
|
||||
pwd_label.set_text("Password:")
|
||||
pwd_label.align_to(pwd_ta, lv.ALIGN.OUT_TOP_LEFT, 0, 0)
|
||||
|
||||
# Create the one-line mode text area
|
||||
text_ta = lv.textarea(lv.scr_act())
|
||||
text_ta = lv.textarea(lv.screen_active())
|
||||
text_ta.set_width(lv.pct(45))
|
||||
text_ta.set_one_line(True)
|
||||
text_ta.add_event(ta_event_cb, lv.EVENT.ALL, None)
|
||||
@@ -35,12 +35,12 @@ text_ta.set_password_mode(False)
|
||||
text_ta.align(lv.ALIGN.TOP_RIGHT, -5, 20)
|
||||
|
||||
# Create a label and position it above the text box
|
||||
oneline_label = lv.label(lv.scr_act())
|
||||
oneline_label = lv.label(lv.screen_active())
|
||||
oneline_label.set_text("Text:")
|
||||
oneline_label.align_to(text_ta, lv.ALIGN.OUT_TOP_LEFT, 0, 0)
|
||||
|
||||
# Create a keyboard
|
||||
kb = lv.keyboard(lv.scr_act())
|
||||
kb = lv.keyboard(lv.screen_active())
|
||||
kb.set_size(lv.pct(100), lv.pct(50))
|
||||
|
||||
kb.set_textarea(pwd_ta) # Focus it on one of the text areas to start
|
||||
|
||||
Reference in New Issue
Block a user