From 6ea977db5faa9342c90a4feb81a19182b55ab574 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sat, 11 Apr 2026 22:21:47 +0300 Subject: Add macro to print a message --- main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 74e283f..154fc9a 100644 --- a/main.c +++ b/main.c @@ -179,8 +179,7 @@ int main(int argc, char **argv) { } break; case 's': - move(height + map_offset_y + 1, map_offset_x - 2); clrtoeol(); /* Clears the line */ - mvprintw(height + map_offset_y + 1, map_offset_x - 2, "Filename: "); + message(height, "Filename: "); /* TODO: figure out how to show the cursor and echo the characters */ curs_set(2); /* Hide the cursor */ echo(); /* Don't echo characters */ @@ -189,8 +188,7 @@ int main(int argc, char **argv) { noecho(); /* Don't echo characters */ mvgetnstr(height + map_offset_y + 1, map_offset_x - 2, filename, FILENAME_BUF_SIZE - 1); map_to_bmp(map, width, height, start_pos, end_pos, path, visited, filename); - move(height + map_offset_y + 1, map_offset_x - 2); clrtoeol(); /* Clears the line */ - mvprintw(height + map_offset_y + 1, map_offset_x - 2, "Saved to %s", filename); + message(height, "Saved to %s", filename); getch(); break; case 'n': -- cgit v1.2.3