summaryrefslogtreecommitdiff
path: root/src/Screen.cpp
blob: 40a31d1a1b34317e5c6025f67514822714262c88 (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
31
32
33
34
35
36
#include "Screen.hpp"

Screen::Screen()
{
    initscr();
    clear();
    noecho();
    cbreak();
    keypad(stdscr,TRUE);
    curs_set(0);
    getmaxyx(stdscr,height,width);
    
    start_color();
    init_pair(1, COLOR_GREEN, COLOR_RED);
}

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

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

int Screen::getHeight()
{
    return height;
}

int Screen::getWidth()
{
    return width;
}