bit more work on komens
/ sync-to-origin (push) Has been cancelled

This commit is contained in:
2025-04-05 11:49:01 +02:00
parent b005631d20
commit b352daabfb
9 changed files with 221 additions and 32 deletions
+13 -13
View File
@@ -1,24 +1,20 @@
#include "helper_funcs.h"
#include "komens_menu.h"
#include "marks.h"
#include "net.h"
#include "timetable.h"
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <curses.h>
#include <menu.h>
#include "marks.h"
#define CTRLD 4
wchar_t *choices[] = {
L"login", L"Marks", L"timetable", L"Komens",
L"Homework", L"Absence", L"Exit", nullptr,
};
void (*choicesFuncs[])() = {nullptr, marks_page, timetable_page, nullptr,
nullptr, nullptr, nullptr, nullptr};
void main_menu() {
wchar_t *choices[] = {
L"login", L"Marks", L"timetable", L"Komens",
L"Homework", L"Absence", L"Exit", nullptr,
};
void (*choicesFuncs[])() = {nullptr, marks_page, timetable_page, komens_menu,
nullptr, nullptr, nullptr, nullptr};
ITEM **my_items;
int c;
MENU *my_menu;
@@ -85,12 +81,15 @@ void main_menu() {
break;
case KEY_UP:
case KEY_PPAGE:
case KEY_PPAGE:
case 'k':
menu_driver(my_menu, REQ_UP_ITEM);
break;
case 10: // ENTER
clear();
if (item_index(current_item(my_menu)) == n_choices - 1) {
goto close_menu;
}
choicesFuncs[item_index(current_item(my_menu))]();
pos_menu_cursor(my_menu);
refresh();
@@ -99,6 +98,7 @@ void main_menu() {
}
wrefresh(my_menu_win);
}
close_menu:
/* Unpost and free all the memory taken up */
unpost_menu(my_menu);