[AD] Re: d_radio_proc and d_check_proc |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] Re: d_radio_proc and d_check_proc
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sun, 11 Sep 2005 04:24:26 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:message-id; b=rN6VZNDORXkjLpQEwo1FE78d3h3KTGCTLDKXcqJPeNmj1HktRWP3e0czaTYjPQhxh17rU+0Vb9klzNSKfHTZV7y/8/zshCJxzmIP4MZ4PNGNE6au55etokJZG2nh4rsy8BgsNoqsOc+r6eJj43LV09qpQ9t9eMUCx3g4akJ/KWE=
Erk. Ignore that last patch. This one fixes some problems I missed with it.
Index: src/guiproc.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/guiproc.c,v
retrieving revision 1.30
diff -u -r1.30 guiproc.c
--- src/guiproc.c 29 Jun 2005 20:26:54 -0000 1.30
+++ src/guiproc.c 11 Sep 2005 11:19:37 -0000
@@ -417,17 +417,19 @@
fg = (d->flags & D_DISABLED) ? gui_mg_color : d->fg;
bg = (d->bg < 0) ? gui_bg_color : d->bg;
- x = d->x + ((d->d1) ? 0 : gui_textout_ex(gui_bmp, d->dp, d->x, d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, d->bg, FALSE) + text_height(font)/2);
+ rectfill(gui_bmp, d->x, d->y, d->x+d->w-1, d->y+d->h-1, bg);
+ if (d->flags & D_GOTFOCUS)
+ dotted_rect(d->x, d->y, d->x+d->w-1, d->y+d->h-1, fg, bg);
+
+ x = d->x + ((d->d1) ? 0 : gui_textout_ex(gui_bmp, d->dp, d->x, d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, -1, FALSE) + text_height(font)/2);
rectfill(gui_bmp, x+1, d->y+1, x+d->h-2, d->y+d->h-2, bg);
rect(gui_bmp, x, d->y, x+d->h-1, d->y+d->h-1, fg);
if (d->d1)
- gui_textout_ex(gui_bmp, d->dp, x+d->h-1+text_height(font)/2, d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, d->bg, FALSE);
+ gui_textout_ex(gui_bmp, d->dp, x+d->h-1+text_height(font)/2, d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, -1, FALSE);
if (d->flags & D_SELECTED) {
line(gui_bmp, x, d->y, x+d->h-1, d->y+d->h-1, fg);
line(gui_bmp, x, d->y+d->h-1, x+d->h-1, d->y, fg);
}
- if (d->flags & D_GOTFOCUS)
- dotted_rect(x+1, d->y+1, x+d->h-2, d->y+d->h-2, fg, bg);
return D_O_K;
}
@@ -454,13 +456,15 @@
fg = (d->flags & D_DISABLED) ? gui_mg_color : d->fg;
bg = (d->bg < 0) ? gui_bg_color : d->bg;
- gui_textout_ex(gui_bmp, d->dp, d->x+d->h-1+text_height(font), d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, d->bg, FALSE);
+ rectfill(gui_bmp, d->x, d->y, d->x+d->w-1, d->y+d->h-1, bg);
+ if (d->flags & D_GOTFOCUS)
+ dotted_rect(d->x, d->y, d->x+d->w-1, d->y+d->h-1, fg, bg);
+
+ gui_textout_ex(gui_bmp, d->dp, d->x+d->h-1+text_height(font), d->y+(d->h-(text_height(font)-gui_font_baseline))/2, fg, -1, FALSE);
x = d->x;
r = d->h/2;
-
center = x+r;
- rectfill(gui_bmp, x, d->y, x+d->h-1, d->y+d->h-1, bg);
switch (d->d2) {
@@ -477,13 +481,6 @@
break;
}
- if (d->flags & D_GOTFOCUS) {
- if (d->d2 == 1)
- dotted_rect(x+1, d->y+1, x+d->h-2, d->y+d->h-2, fg, bg);
- else
- dotted_rect(x, d->y, x+d->h-1, d->y+d->h-1, fg, bg);
- }
-
return D_O_K;
case MSG_KEY: