Re: [AD] GUI - d_ctext_proc, file_select_ex, gui_textout_ex

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, 2003-06-16 at 17:26, Eric Botcazou wrote:
> > Well, not exactly wrong, but with "x coordinate", they don't mean d->x,
> > but just that the x direction is used for centering.
> 
> They do mean d->x originally, but this is not true anymore in the 4.1.x 
> series (starting with 4.1.10 WIP). The change is consistent with 
> d_rtext_proc(), which has always used d->x + d->w and not d->x alone.

Yes, I see now. This change completely had escaped me until now, I even
have some comments in one of my source codes complaining about the old
behaviour. I also should update exgui to have proper bounding boxes for
all graphical GUI elements now..

> It may appear as a bit border-line with regard to backward compatibility, but 
> I think 99% of the uses of d_ctext_proc() are with d->w = (0|1) so that 
> doesn't really matter.

Yes, definitely a good idea that it was changed. With it, everything
except circled d_check_proc with (un?)even-sized dimensions respects the
bounding box (I think the circles are one pixel too big, and I failed to
fix it about a year ago..). Now, about the clipping, maybe have a global
flag smiiliar to gui_mouse_focus to enable it, so old GUI apps don't get
unwanted clipping..

> > This is clearer I think:
> 
> --- allegro._tx 14 Jun 2003 09:48:06 -0000      1.162
> +++ allegro._tx 15 Jun 2003 12:54:28 -0000
> @@ -7635,8 +7635,8 @@
>  @@int @d_rtext_proc(int msg, DIALOG *d, int c);
>  @eref exgui, exrgbhsv
>     These draw text onto the screen. The dp field should point to the string
> -   to display. d_ctext_proc() centres the string around the x coordinate,
> -   and d_rtext_proc() right aligns it. Any '&' characters in the string will
> +   to display. d_ctext_proc() centers the string horizontally, and
> +   d_rtext_proc() right aligns it. Any '&' characters in the string will
>     be replaced with lines underneath the following character, for displaying
>     keyboard shortcuts (as in MS Windows). To display a single ampersand, put
>     "&&". To draw the text in something other than the default font, set the
> 
> 
> Ok for trunk.

Applied.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/