Hi folks! When I run this screen appears black, only the mouse over it. No texts, nor buttons. Why?
int main() { DIALOG dialog[] = { { d_clear_proc,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL }, { d_text_proc,20,20,0,0,0,0,0,0,0,0,"hello!",NULL,NULL }, { NULL,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL } }; allegro_init(); ... do_dialog(dialog,-1); return 0; }
Help please! Thanks!
You are not creating a screenmode, so nothing will appear. Check out the gui example that comes with Allegro.
i've already whatched it out; the thing is graphic mode was set up yet.
You are not creating a screenmode, so nothing will appear.
I think '...' in his code snippet means the bit where he sets up Allegro
Paste the smallest piece of code that compiles and behaves incorrectly.
Well, it's finally worked... don't know why but it was needed this:
gui_fg_color = makecol(0, 0, 0); gui_mg_color = makecol(255, 0, 0); gui_bg_color = makecol(200, 240, 200); set_dialog_color(dialog,gui_fg_color,gui_bg_color); do_dialog(dialog,-1);
I reviewed the example, copy that and know there appears everything. Thanks anyway!
You have ALL zeroes on each line of your dialog code. Some of those numbers specify the colors, and 0 = black, so if everything (bg, fg, etc) is black, your screen will be black.