Skip to content

Commit

Permalink
Update main.c
Browse files Browse the repository at this point in the history
changed how the curser placement works to be based on if there is a saved username or not
  • Loading branch information
kefoster951 committed May 12, 2022
1 parent 1890da4 commit 559f2f7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 559f2f7

Please sign in to comment.