Re: [AD] Overloading Alert

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


Evert Glebbeek wrote:
I think we should have a popup_message(char *s, ...) and possibly a string for the button text and leave alert as it is.

Hmm.. perhaps we could modify allegro_message to use a popup GUI dialog when in a gfx mode? The current implementation of allegro_message says it should not be used when in a gfx mode, so extending it to use the GUI in a gfx mode doesn't sound ilke it'll break anything. The only issue would be no clean way to change the button text, though with clever use of a special char sequence, that could be fixed. Like:

allegro_message("This is a message box\nPh34r"
                "<\some-special-escape-sequence>Click Me!");

The escape sequence could even have a special define to clean that up:

#define BUTTON_TEXT "\some-special-escape-sequence"
allegro_message("This is a message box\nPh34r" BUTTON_TEXT "Click Me!");

Not only that, but the Win32/xmessage/etc messagebox dialogs could even be extended to use the special button text too.




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