Skip to content
Permalink
Browse files
Fixed visible cursor in menu.
  • Loading branch information
wlodarsb committed Feb 14, 2019
1 parent 022c43e commit 031494a387b12dd354105373682bdf7a1512ed68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -10,7 +10,8 @@ Game::Game(bool cbreak_present)
GameWindow game_view(LINES * 1/3, COLS, 0, 0);
GameWindow hero_stats(LINES * 1/3, COLS, LINES * 1/3, 0);
GameWindow abilities(LINES * 1/3, COLS, LINES * 2/3, 0);

noecho();
curs_set(0);
if(cbreak_present)
{
cbreak();
@@ -23,7 +24,7 @@ Game::Game(bool cbreak_present)
game_view.Print("Hello world!");
game_view.Print("'cbreak' was not present.");
}
hero_stats.Print("Test window", true);
hero_stats.Print("Test window");
//abilities.Print("Another test", true);
vector<string> abil = {"Attack", "Defend", "Special 1", "Special 2", "Ultimate", "Transform"};
abilities.Menu(abil);
@@ -43,7 +43,7 @@ void GameWindow::Menu(vector<string> menus)
wattron(window, A_REVERSE);
}
//GameWindow::Print(menus[i].c_str(), i, 1);
mvwprintw(window, i + 1, 1, menus[i].c_str());
mvwprintw(window, 2*i + 1, 1, menus[i].c_str());
wattroff(window, A_REVERSE);
}
choice = wgetch(window);

0 comments on commit 031494a

Please sign in to comment.