delegate draw to persons
This commit is contained in:
+14
@@ -169,3 +169,17 @@ WINDOW* Person::createPad()const
|
||||
|
||||
return pad;
|
||||
}
|
||||
|
||||
void Person::draw(U16 drawY, U16 drawX) const
|
||||
{
|
||||
U16 width = name_.size() + 4; /* TODO: get actual lenght */
|
||||
WINDOW* pad = newpad(BOX_HEIGHT, width);
|
||||
|
||||
box(pad, BOX_HEIGHT, width);
|
||||
mvwaddstr(pad, 2, 2, name_.data());
|
||||
|
||||
pnoutrefresh(pad, 0, 0,
|
||||
drawY, drawX,
|
||||
drawY + BOX_HEIGHT-1, drawX + width-1);
|
||||
delwin(pad);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user