hide cursor
This commit is contained in:
@@ -11,6 +11,7 @@ int main()
|
||||
|
||||
/* Init ncurses */
|
||||
initscr(); /* Start curses mode */
|
||||
curs_set(0); /* Hide cursor */
|
||||
noecho();
|
||||
cbreak(); /* get input instantly */
|
||||
keypad(stdscr, true);
|
||||
|
||||
+1
-27
@@ -69,21 +69,6 @@ Person::Person(const char* name, EventTime birth, bool isMale, EventTime death)
|
||||
}
|
||||
|
||||
|
||||
/*Person& Person::operator=(const Person &other)
|
||||
{
|
||||
if (&other!=this)
|
||||
{
|
||||
rename(other.name);
|
||||
numRel = other.numRel;
|
||||
isMale = other.isMale;
|
||||
day = other.day;
|
||||
month = other.month;
|
||||
year = other.year;
|
||||
}
|
||||
return *this;
|
||||
}*/
|
||||
|
||||
|
||||
bool Person::operator==(const Person &other)const
|
||||
{
|
||||
return name_ == other.name_ && isMale_ == other.isMale_; //TODO && day == other.day || !day || !other.day) && (month == other.month || !month || !other.month) && (year == other.year || !year || !other.year);
|
||||
@@ -125,7 +110,7 @@ void Person::rename(const char* newName)
|
||||
name_ = newName;
|
||||
}
|
||||
|
||||
void Person::print()const
|
||||
void Person::displayInfo()const
|
||||
{
|
||||
info_tab = newwin(LINES, COLS, 0, 0);
|
||||
|
||||
@@ -146,17 +131,6 @@ void Person::print()const
|
||||
werase(info_tab);
|
||||
wrefresh(info_tab); /* todo: dont update */
|
||||
delwin(info_tab);
|
||||
|
||||
/* cout << name_ << '\n'; */
|
||||
/* cout << (isMale_ ? "Male\n" : "Female\n"); */
|
||||
|
||||
/* cout << "Birth: "; */
|
||||
/* birth_.print(); */
|
||||
|
||||
/* cout << "Death: "; //TODO: only print if known */
|
||||
/* death_.print(); */
|
||||
|
||||
/* cout << '\n'; */
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
void load(std::ifstream &file);
|
||||
void rename(const char* newName);
|
||||
|
||||
void print() const;
|
||||
void displayInfo() const;
|
||||
|
||||
bool isMale() const;
|
||||
U16 boxWidth() const;
|
||||
|
||||
@@ -7,7 +7,6 @@ Draw distinct regions of a tree
|
||||
Draw spouses' relatives if main has none
|
||||
|
||||
Color
|
||||
Display info
|
||||
|
||||
Partialy visible people
|
||||
Scrolling
|
||||
|
||||
@@ -399,7 +399,7 @@ void Tree::display()
|
||||
selectUp();
|
||||
break;
|
||||
case 'i':
|
||||
people[selected_].print();
|
||||
people[selected_].displayInfo();
|
||||
draw();
|
||||
break;
|
||||
default: break;
|
||||
@@ -423,7 +423,7 @@ void Tree::draw() const
|
||||
void Tree::print() const
|
||||
{
|
||||
for(auto& member: people)
|
||||
member.print();
|
||||
member.displayInfo();
|
||||
}
|
||||
|
||||
void Tree::printRel(const unsigned id)const
|
||||
@@ -479,13 +479,13 @@ void Tree::printRel(const unsigned id)const
|
||||
|
||||
void Tree::printMember(const unsigned id)const
|
||||
{
|
||||
people[id].print();
|
||||
people[id].displayInfo();
|
||||
}
|
||||
|
||||
void Tree::printOldestAncestors(const unsigned id)const
|
||||
{
|
||||
people[findOldestAncestor(id)].print();
|
||||
people[findOldestAncestor(id, 1)].print();
|
||||
people[findOldestAncestor(id)].displayInfo();
|
||||
people[findOldestAncestor(id, 1)].displayInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user