[AD] Bug #663405

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


"I'm uncertain whether this is linux specific, but it
looks to me like \t in MENU strings that do_dialog
loads up causes the dialog to render improperly. The
border isn't wide enough.

Here is my code:

/// begin code
#include "stdio.h"
#include "allegro.h"

int main()
{
int choice;
char tmp[100];

MENU sub_menu[] =
{
{"A!\t&a", NULL, NULL, 0, NULL},
{"blah says I\tfoo", NULL, NULL, 0, NULL},
{NULL, NULL, NULL, 0, NULL} // last element
needs to be null to terminate
};
MENU my_menu[] =
{
{"1", NULL, NULL, 0, NULL},
{"12\t", NULL, sub_menu, 0, NULL},
{NULL, NULL, NULL, 0, NULL} // last element
needs to be null to terminate
};
DIALOG pulldown_menu_dialog[] =
{
{d_clear_proc, 0, 0, 0, 0, 0, 8, 0, 0,
0, 0, NULL, NULL, NULL},
{d_menu_proc, 0, 0, 0, 0, 255, 8, 0, 0, 0,
0, my_menu, NULL, NULL},
{NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, NULL, NULL, NULL} // null terminate
};
allegro_init();

/* set up the keyboard handler */
install_keyboard();
install_mouse();


/* set a graphics mode sized 800x600 */
if (set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0) != 0) {
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
allegro_message("Unable to set any graphic
mode\n%s\n", allegro_error);
return 1;
}
set_palette(desktop_palette);
clear_to_color(screen, makecol(255, 255, 255));
acquire_screen();
show_mouse(screen);

choice = do_dialog(pulldown_menu_dialog, -1);
sprintf(tmp, "You selected menu option %d.\n", choice);
allegro_message(tmp);

release_screen();
return 0;
}

END_OF_MAIN();

/// end code

In case it's relevant, here are my system details:
CPU: Duron 600Mhz
motherboard: Asus A7V
Video card: ATI XPert 2000 (agp, rage 128 chipset, 32MB)
RAM: 256MB
OS: Debian/Linux
Windowing system: Xfree86 4.2.1-4 (1024x768@xxxxxxxxxx)
Window manager: icewm 1.2.2-1
Allegro version: 4.0.2-1.1
Provided by debian packages:
liballegro-dev-4.0.2-1.1
liballegro4a-4.0.2-1.1

If you need to contact me, please send email to:
bioster@xxxxxxxxxx"


-- 
Eric Botcazou




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