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

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


On Sun, 2003-06-15 at 13:05, Elias Pschernig wrote:
> You have to set the d->x,y,w,h so it includes the complete text. To be
> clear: If your text is 100 pixels wide and 10 pixels high, and you want
> the top/center point to be at 300,300, your x,y,w,h would be this:
> 250,300,100,10. Just found this out right now by looking at the
> d_ctext_proc code in guiproc.c btw., the docs are wrong about it.

Well, not exactly wrong, but with "x coordinate", they don't mean d->x,
but just that the x direction is used for centering. 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

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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