On Tue, Nov 23, 2010 at 10:24:28PM +0100, Olivier Boudeville wrote:
> Hi,
>
> I would like to display a label centered in its container: is there any
> built-in way to do that? I was also thinking to computing and assigning
> directly its coordinates to have it at the center (thus bypassing the
> actual packing system), or to use empty left/right and top/bottom
> elements so that a pane would pack it by design at the center, but both
> solutions seem a bit awkward?
This should do the trick:
AG_Label *label;
label = AG_LabelNew(parent, AG_LABEL_HFILL, "foo");
AG_LabelJustify(label, AG_TEXT_CENTER);
> By the way in http://libagar.org/mdoc.cgi?man=AG_Fixed.3a demos/gamemenu
> demo is mentioned but does not seem to exist (at least not on the 1.4.0
> version from SVN).
Fixed, thanks. "fixedres" is the correct one.
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html