added prompt

This commit is contained in:
leca 2023-02-18 20:30:02 +03:00
parent fa8496ff9a
commit d760ca2b9f
1 changed files with 3 additions and 2 deletions

5
main.c
View File

@ -18,11 +18,12 @@ void clearInput() {
//}
void printPrompt(int* prompt, int len, int position) {
mvprintw(rows - 1, 0, ">");
for (int i = 0; i < len; i ++)
mvprintw(rows - 1, i, "%c", prompt[i]);
mvprintw(rows - 1, i + 1, "%c", prompt[i]);
attron(A_BLINK);
mvprintw(rows - 1, position, "");
mvprintw(rows - 1, position + 1, "");
attroff(A_BLINK);
}