]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
made buttons pay attention to isMapped
authorewt <ewt>
Mon, 16 Feb 1998 22:41:27 +0000 (22:41 +0000)
committerewt <ewt>
Mon, 16 Feb 1998 22:41:27 +0000 (22:41 +0000)
button.c

index 35081bce0668f1804bfa1f8799ecc8ab1b1151e6..bbfeb7f65fb116fbe1976f72cfc21c99de27b4b9 100644 (file)
--- 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;