up down select and focus
This commit is contained in:
+11
-2
@@ -159,6 +159,12 @@ void Person::print()const
|
||||
/* cout << '\n'; */
|
||||
}
|
||||
|
||||
|
||||
bool Person::isMale() const
|
||||
{
|
||||
return isMale_;
|
||||
}
|
||||
|
||||
U16 Person::boxWidth() const
|
||||
{
|
||||
return name_.size() + 4; /* TODO: get actual lenght */
|
||||
@@ -176,12 +182,15 @@ U16 Person::boxWidth() const
|
||||
/* return pad; */
|
||||
/* } */
|
||||
|
||||
void Person::draw(I16 drawY, I16 drawX, bool hasSpouse, bool isSpouse, bool hasKids) const
|
||||
void Person::draw(I16 drawY, I16 drawX, bool selected, bool hasSpouse, bool isSpouse, bool hasKids) const
|
||||
{
|
||||
U16 width = boxWidth();
|
||||
WINDOW* pad = newpad(BOX_HEIGHT, width);
|
||||
|
||||
auto color_pair = COLOR_PAIR(isMale_ ? COLOR_MALE : COLOR_FEMALE);
|
||||
auto color_pair = COLOR_PAIR( selected ? COLOR_SELECTED
|
||||
: (isMale_ ? COLOR_MALE : COLOR_FEMALE) );
|
||||
|
||||
|
||||
wbkgd(pad, color_pair);
|
||||
/* wattron(pad, color_pair); */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user