adds title to sent commands log

This commit is contained in:
Louis-Guillaume DUBOIS 2015-05-02 19:58:04 +02:00
parent 5fcf47d77a
commit 743c4fafd0
2 changed files with 13 additions and 5 deletions

View file

@ -20,6 +20,7 @@ const int Curses::log_sent_w_columns = 40;
Curses::Curses() {
initscr();
cbreak();
start_color();
//noecho();
cmd_kbd = newwin(cmd_kbd_lines, cmd_kbd_columns, 0, 0);
@ -30,14 +31,16 @@ Curses::Curses() {
cmd_speed = newwin(cmd_speed_lines, cmd_speed_columns,
cmd_kbd_lines + get_lines, 0);
log_sent_w = newwin(log_sent_w_lines, log_sent_w_columns,
0, cmd_kbd_columns + 1);
log_line_number = log_sent_w_lines - 1;
log_sent_title = newwin(1, log_sent_w_columns,
0, cmd_kbd_columns + 1);
waddstr(log_sent_title, "SENT COMMANDS");
wrefresh(log_sent_title);
log_sent_w = newwin(log_sent_w_lines - 1, log_sent_w_columns,
1, cmd_kbd_columns + 1);
log_line_number = log_sent_w_lines - 2;
wattron(log_sent_w, A_BOLD);
start_color();
init_pair(1, COLOR_RED, COLOR_BLACK);
wattron(log_sent_w, COLOR_PAIR(1));
scrollok(log_sent_w, TRUE);
nav_data = newwin(nav_data_lines, nav_data_columns,
@ -54,6 +57,7 @@ Curses::~Curses() {
delwin(cmd_kbd);
delwin(cmd_speed);
delwin(log_sent_w);
delwin(log_sent_title);
delwin(nav_data);
delwin(get);
endwin();

View file

@ -228,6 +228,10 @@ class Run
break;
}
default :
{
cmd.publish(msg);
term->log_sent("hover !");
}
break;
} // switch(c)
loop_rate.sleep();