@@ -8,12 +8,13 @@ use crate::{
88 scene:: { check_read_tos_and_policy, dispatch_tos_task, JUST_ACCEPTED_TOS } ,
99} ;
1010use anyhow:: Result ;
11+ use inputbox:: { InputBox , InputMode } ;
1112use macroquad:: prelude:: * ;
1213use once_cell:: sync:: Lazy ;
1314use prpr:: {
1415 core:: BOLD_FONT ,
1516 ext:: { semi_black, semi_white, RectExt } ,
16- scene:: { request_input, request_password , return_input, show_error, show_message, take_input} ,
17+ scene:: { request_input, return_input, show_error, show_message, take_input} ,
1718 task:: Task ,
1819 ui:: { DRectButton , Dialog , Ui } ,
1920} ;
@@ -147,23 +148,23 @@ impl Login {
147148 return true ;
148149 }
149150 if self . input_email . touch ( touch, t) {
150- request_input ( "email" , & self . t_email ) ;
151+ request_input ( "email" , InputBox :: new ( ) . default_text ( & self . t_email ) ) ;
151152 return true ;
152153 }
153154 if self . input_pwd . touch ( touch, t) {
154- request_password ( "pwd" , & self . t_pwd ) ;
155+ request_input ( "pwd" , InputBox :: new ( ) . default_text ( & self . t_pwd ) . mode ( InputMode :: Password ) ) ;
155156 return true ;
156157 }
157158 if self . input_reg_email . touch ( touch, t) {
158- request_input ( "reg_email" , & self . t_reg_email ) ;
159+ request_input ( "reg_email" , InputBox :: new ( ) . default_text ( & self . t_reg_email ) ) ;
159160 return true ;
160161 }
161162 if self . input_reg_name . touch ( touch, t) {
162- request_input ( "reg_name" , & self . t_reg_name ) ;
163+ request_input ( "reg_name" , InputBox :: new ( ) . default_text ( & self . t_reg_name ) ) ;
163164 return true ;
164165 }
165166 if self . input_reg_pwd . touch ( touch, t) {
166- request_password ( "reg_pwd" , & self . t_reg_pwd ) ;
167+ request_input ( "reg_pwd" , InputBox :: new ( ) . default_text ( & self . t_reg_pwd ) . mode ( InputMode :: Password ) ) ;
167168 return true ;
168169 }
169170 if self . btn_to_reg . touch ( touch, t) || self . btn_to_login . touch ( touch, t) {
0 commit comments