Added reactiveness to terminal resize

This commit is contained in:
2026-03-28 06:57:54 +05:30
parent a4f0f0e1f9
commit 640ea1b267
2 changed files with 20 additions and 8 deletions
+4 -4
View File
@@ -6,7 +6,7 @@
class Menu {
public:
Menu(std::string text, char trigger, std::string *items, int num_items)
Menu(std::string text, int trigger, std::string *items, int num_items)
{
this->text = text;
this->trigger = trigger;
@@ -16,7 +16,7 @@ class Menu {
}
int start_x;
std::string text;
char trigger;
int trigger;
std::string *items;
int num_items;
int selected_item;
@@ -99,10 +99,10 @@ class MenuBar {
{
switch(ch)
{
case 'k':
case 'j':
menu.selectNextItem();
break;
case 'j':
case 'k':
menu.selectPrevItem();
break;
default: