diff --git a/src/main.cpp b/src/main.cpp index 9e4a582..05f0d43 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ #include #include "color.h" #include "const.h" +#include "menu.h" void PrintHelp() { std::cout << RED R"( ____ ____ @@ -41,8 +42,7 @@ int main(int argc, char* argv[]) { return EINVAL; } } + menu(); - for (int i = 0; i < 10; i++) { - std::cout << "trestní oznámení\n"; - } + return 0; } diff --git a/src/menu.cpp b/src/menu.cpp index e69de29..a19db91 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -0,0 +1,19 @@ +#include +#include +#include + +void menu() { + + /* Initialize curses */ + setlocale(LC_ALL, ""); + initscr(); + start_color(); + cbreak(); + noecho(); + keypad(stdscr, TRUE); + + /* Initialize all colors */ + for (uint8_t i = 0; i < 8; i++) { + init_pair(i, i, COLOR_BLACK); + } +} \ No newline at end of file diff --git a/src/menu.h b/src/menu.h index e69de29..35882a2 100644 --- a/src/menu.h +++ b/src/menu.h @@ -0,0 +1,7 @@ + +#ifndef PARADOCS_MENU_H_ +#define PARADOCS_MENU_H_ + +void menu(); + +#endif \ No newline at end of file