This is to continue yet another thread that locked too soon.
Part I is here :
https://www.allegro.cc/forums/thread/618632
alex I will try to test your code today. I've just been busy with other things.
Hi Edgar, thank you. Surely I've made a mistake and I don't see where it is, thanks.
alex, I can't get your code to compile. It keeps saying narrowing conversions from -1 to uint16_t and I don't know what's wrong with it.
Can you provide a working example?
EDIT
I'm trying to debug something now. ALLEGRO_MENU_SEPARATOR doesn't work out of the box. That's where the -1 to uint16_t conversions come from.
I'm debugging menu creation. It's not working right yet.
Hi Edgar. It works correctly for me, but it expands the window below with a strip of the same thickness as the menu, that is, a thick line at the end of the window, except for that problem, everything works correctly. The program has more than 12,000 lines of c++ code, I only put the part where the menu was defined and executed. Anyway, I am attaching an example.
If I remove... " al_set_display_menu(window, menu); "
fringe not shown.
That's certainly bizarre. I have no idea why it does that. I'll keep trying. I also asked SiegeLord about this.
Thanks, I use windows 11 and visual studio (c++).
I have not tried it on another operating system, although with "al_clear_to_color" I can change the color of the strip that it adds to the window and it is not very noticeable to the eye.
I get the stripe too if I don't draw to the display, but if I draw, there's no stripe. Here's the code I used to test:
Yeah, just draw to the screen and clear the new backbuffer at least once. Then it will disappear. Your menu works fine here for me now too.
Thanks SiegeLord.
Ok, thanks guys, in the end we will have to draw as you comment to cover the strip, notice that when you put "al_set_display_menu(window, menu);" the window grows at the top to include the menu and also at the bottom (the black strip below the line in the photo that does not disappear). It's really just a cosmetic issue. Thank you very much