_Bool panel_dclick(PANEL *p, _Bool triclick) { _Bool draw = 0; if(p->type == PANEL_EDIT) { draw = edit_dclick((EDIT*)p, triclick); } else if(p->type == PANEL_MESSAGES) { draw = messages_dclick((MESSAGES*)p, triclick); } PANEL **pp = p->child, *subp; if(pp) { while((subp = *pp++)) { if(!subp->disabled) { draw = panel_dclick(subp, triclick); if(draw) { break; } } } } if(draw && p == &panel_main) { redraw(); } return draw; }
bool panel_dclick(PANEL *p, bool triclick) { bool draw = false; if (p->type == PANEL_EDIT) { draw = edit_dclick((EDIT *)p, triclick); } else if (p->type == PANEL_MESSAGES) { draw = messages_dclick(p, triclick); } PANEL **pp = p->child; if (pp) { PANEL *subp; while ((subp = *pp++)) { if (!subp->disabled) { draw = panel_dclick(subp, triclick); if (draw) { break; } } } } if (draw && p == &panel_root) { redraw(); } return draw; }