From b74d841941dc525f66dd31a300615c6b546f921e Mon Sep 17 00:00:00 2001 From: kefoster951 <42386206+kefoster951@users.noreply.github.com> Date: Thu, 12 May 2022 11:05:23 -0400 Subject: [PATCH] Update main.c changed how the curser placement works to be based on if there is a saved username or not --- src/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index a1d2c09..62878d9 100644 --- a/src/main.c +++ b/src/main.c @@ -135,8 +135,16 @@ int main(int argc, char** argv) // init visible elements struct tb_event event; struct term_buf buf; - uint8_t active_input = config.default_input; - + + //Place the curser on the login field if there is no saved username, if there is, place the curser on the password field + uint8_t active_input; + if (login.text == login.end) + { + active_input = LOGIN_INPUT; + } + else{ + active_input = PASSWORD_INPUT; + } // init drawing stuff draw_init(&buf);