summaryrefslogtreecommitdiff
path: root/src/Screen.cpp
blob: 2cc5079734dd5e44b66ccb9ad2ce92ae8f8a8f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Screen.hpp"

Screen::Screen()
{
    initscr();
    clear();
    noecho();
    cbreak();
    keypad(stdscr,TRUE);
    curs_set(0);
    getmaxyx(stdscr,height,width);
    timeout(100);

    start_color();
    init_pair(1, COLOR_GREEN, COLOR_BLACK);
    init_pair(2, COLOR_YELLOW,COLOR_BLACK);
    init_pair(3, COLOR_WHITE, COLOR_WHITE);
    init_pair(4, COLOR_WHITE, COLOR_BLUE);
}

Screen::~Screen()
{
    endwin();
}

void Screen::ping(string msg)
{
    const char * cmsg = msg.c_str();
    printw(cmsg);
}