removed .orig files (astyle backups)
This commit is contained in:
@ -2,53 +2,53 @@
|
||||
#include "constants.h"
|
||||
|
||||
cursor::cursor() {
|
||||
initscr();
|
||||
initscr();
|
||||
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(COLOR_BLACK_ON_WHITE, COLOR_BLACK, COLOR_WHITE);
|
||||
}
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(COLOR_BLACK_ON_WHITE, COLOR_BLACK, COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
cursor::~cursor() {
|
||||
endwin();
|
||||
endwin();
|
||||
}
|
||||
|
||||
int cursor::getcmd() const {
|
||||
return getch();
|
||||
return getch();
|
||||
}
|
||||
|
||||
void cursor::show() const {
|
||||
refresh();
|
||||
refresh();
|
||||
}
|
||||
|
||||
void cursor::clear() const {
|
||||
::clear();
|
||||
::clear();
|
||||
}
|
||||
|
||||
void cursor::print_char(const position &pos, const char ch,
|
||||
const int attrs) const {
|
||||
attrset(attrs);
|
||||
mvaddch(pos.y, pos.x, ch);
|
||||
attrset(attrs);
|
||||
mvaddch(pos.y, pos.x, ch);
|
||||
}
|
||||
|
||||
void cursor::print_str(const position &pos, const std::string str,
|
||||
const int attrs) const {
|
||||
attrset(attrs);
|
||||
mvaddstr(pos.y, pos.x, str.c_str());
|
||||
attrset(attrs);
|
||||
mvaddstr(pos.y, pos.x, str.c_str());
|
||||
}
|
||||
|
||||
bool check_terminal_size() {
|
||||
int max_x;
|
||||
int max_y;
|
||||
getmaxyx(stdscr, max_y, max_x);
|
||||
int max_x;
|
||||
int max_y;
|
||||
getmaxyx(stdscr, max_y, max_x);
|
||||
|
||||
return max_x >= DISPLAY_WIDTH && max_y >= DISPLAY_HEIGHT;
|
||||
return max_x >= DISPLAY_WIDTH && max_y >= DISPLAY_HEIGHT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user