summaryrefslogtreecommitdiff
path: root/src/Screen.cpp
blob: c3977d6f19ee2ac05aa598be5b406cd2dd9f4f10 (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
#include "Screen.hpp"

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

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;
}