relation change

This commit is contained in:
vrd
2022-12-27 20:07:56 +02:00
parent cd221476a5
commit cc9b0ccc21
8 changed files with 515 additions and 497 deletions
+16 -10
View File
@@ -159,20 +159,26 @@ void Person::print()const
/* cout << '\n'; */
}
WINDOW* Person::createPad()const
U16 Person::boxWidth() const
{
U16 width = name_.size() + 4;
WINDOW* pad = newpad(5, width);
box(pad, 5, width);
mvwaddstr(pad, 2, 2, name_.data());
return pad;
return name_.size() + 4 - 1; /* TODO: get actual lenght */
}
void Person::draw(U16 drawY, U16 drawX) const
/* WINDOW* Person::createPad()const */
/* { */
/* U16 width = name_.size() + 4; */
/* WINDOW* pad = newpad(5, width); */
/* box(pad, 5, width); */
/* mvwaddstr(pad, 2, 2, name_.data()); */
/* return pad; */
/* } */
void Person::draw(I16 drawY, I16 drawX) const
{
U16 width = name_.size() + 4; /* TODO: get actual lenght */
U16 width = boxWidth();
WINDOW* pad = newpad(BOX_HEIGHT, width);
box(pad, BOX_HEIGHT, width);