From: ewt Date: Mon, 16 Feb 1998 22:41:27 +0000 (+0000) Subject: made buttons pay attention to isMapped X-Git-Tag: r0-22~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=993036dd42c8d1724ce8c73f4c8148a27f40952e;p=thirdparty%2Fnewt.git made buttons pay attention to isMapped --- diff --git a/button.c b/button.c index 35081bc..bbfeb7f 100644 --- a/button.c +++ b/button.c @@ -50,6 +50,7 @@ static newtComponent createButton(int left, int row, const char * text, int comp co->top = row; co->left = left; co->takesFocus = 1; + co->isMapped = 0; newtGotorc(co->top, co->left); bu->bgColor = -1; @@ -87,6 +88,8 @@ static void buttonDraw(newtComponent co) { static void buttonDrawIt(newtComponent co, int active, int pushed) { struct button * bu = co->data; + if (!co->isMapped) return; + if (bu->bgColor == -1) { newtGotorc(co->top, co->left); bu->bgColor = (SLsmg_char_at() >> 8) & 0xFF;