Re: [AD] Alert function.

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


On 12/6/05, Dustin Dettmer <dustin@xxxxxxxxxx> wrote:
yeah the dialog adapts its size, but if the dialog has extra space (ie the text of the alert box) then the buttons all have to move over so their centered.


button_x = dialog_x + (dialog_w - (
button_w * button_count + button_space * (button_count 
- 1))) / 2;

for
(i = 0; i < button_count; ++i)
{
/* button (#i).x = button_x */
button_x += button_w + button_space;
}


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