![]() |
|
Allegro GUI isn't refreshing |
Ceagon Xylas
Member #5,495
February 2005
![]() |
My code is
The problem is whenever...say...I type something into 'd_edit_proc' and press enter, I have to press another key or hover over the text box to tell it to update. By update I mean show that edit_1 is empty and that text_1 has been added to. How can I fix this? |
ReyBrujo
Moderator
January 2001
![]() |
I believe the problem is that your edit box captures the ENTER. Why don't you create your own edit box that, if you got an ENTER, raises it to the dialog? -- |
Ceagon Xylas
Member #5,495
February 2005
![]() |
Hmm... can you give me a more detailed explination of what creating my 'own edit box' would consist of? Should I use the DIALOG_PLAYER stuff? Well, I guess I'd have to use my method above. |
ReyBrujo
Moderator
January 2001
![]() |
The easiest way is to make your ptext function return D_REDRAW_ALL instead of D_O_K. And, if the user presses ENTER in the edit box, to call ptext. See here (I deleted a few lines because I am on Linux):
A better solution should be to have ptext send a message to the textbox to redraw, so that there is only one redraw. But that is homework for you -- |
Ceagon Xylas
Member #5,495
February 2005
![]() |
Oh wow! Thanks a whole lot! =D |
|