![]() |
|
Dialog Not Working Correctly |
Ron Rider
Member #8,208
January 2007
|
Within the past week or two, I have been learning how to use Allegro Dialogs, and I thought I had the hang of them. That was until one of my DIALOG arrays stopped working correctly. I had declared the following DIALOG:
And I am calling it with do_dialog: do_dialog(your_char_dialog, -1); The 2nd and 3rd buttons both work, and do their job; however, the first one(which calls (void*)SaveChar) does not do anything. When I click the button it only gets selected, but does not call SaveChar(). This button used to work since the beginning of my game, but it just stopped working, and I am not sure why. I have tried moving the do_dialog() call to the beginning of my program, but that doesn't work. I have even tried putting another button in front of the faulty button, that doesn't work either. My code compiles fine the button just doesn't do anything. Can anyone help me with this? |
ImLeftFooted
Member #3,935
October 2003
![]() |
Did you do a total recompile? |
Ron Rider
Member #8,208
January 2007
|
Yes, I rebuilt the whole program before I ran it. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Ron - Check the flags field of your first game_button_proc. D_EXIT is not set, so when you click on your first button , the D_CLOSE message is never sent to the dialog (which is what calls your function) Hope this helps My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
ImLeftFooted
Member #3,935
October 2003
![]() |
Add a D_EXIT flag to the first button. |
Ron Rider
Member #8,208
January 2007
|
That did it. Thanks a lot guys. |
|