|
why this doesn't work? |
Maikol
Member #4,997
September 2004
|
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!
El sabio no dice todo lo que piensa, pero siempre piensa todo lo que dice |
Richard Phipps
Member #1,632
November 2001
|
You are not creating a screenmode, so nothing will appear. Check out the gui example that comes with Allegro. |
Maikol
Member #4,997
September 2004
|
i've already whatched it out; the thing is graphic mode was set up yet.
El sabio no dice todo lo que piensa, pero siempre piensa todo lo que dice |
Neil Walker
Member #210
April 2000
|
Quote: You are not creating a screenmode, so nothing will appear. I think '...' in his code snippet means the bit where he sets up Allegro Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
ImLeftFooted
Member #3,935
October 2003
|
Paste the smallest piece of code that compiles and behaves incorrectly. |
Maikol
Member #4,997
September 2004
|
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!
El sabio no dice todo lo que piensa, pero siempre piensa todo lo que dice |
BAF
Member #2,981
December 2002
|
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. |
|