relation change
This commit is contained in:
+16
-10
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user