manual??? and refactoring
This commit is contained in:
33
manual.c
Normal file
33
manual.c
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Created by snapshot112 on 10/17/25.
|
||||
//
|
||||
|
||||
#include "manual.h"
|
||||
|
||||
#include <ncurses.h>
|
||||
|
||||
#include "rooster.h"
|
||||
|
||||
void manual(const coordinate display_location) {
|
||||
erase();
|
||||
FILE *fp = fopen("assets/handleiding.txt", "r");
|
||||
if (fp == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
rooster *grid = grid_from_file(fp);
|
||||
if (grid == NULL) {
|
||||
mvaddstr(display_location.y, display_location.x, "Error loading grid");
|
||||
return;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
show_grid_on_offset(grid, display_location.x, display_location.y);
|
||||
|
||||
rooster_klaar(grid);
|
||||
|
||||
int ch = getch();
|
||||
while (ch != KEY_ESCAPE && ch != KEY_BACKSPACE && ch != ' ') {
|
||||
ch = getch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user