Initializing "events"
Posted: Tue Apr 28, 2009 18:00
Hi , i am a little bit in trouble =) I have a gui system in mind and I dont want to code it further before deciding what to do.
I am thinking of loading layout files at the beginning of my program and when the game state changes I will change the "sheet" too.But where should I register events? in functions which cause state changes? I mean should I register them after I change the sheet?
And what happens (if it is possible to) when reregistered? player goes from menu to game and again back to menu,which can cause reregistering.And do the windows keep their registered events, even if they are inactive? Another way could be to register events when loading layouts from files, so reregistering wouldn't be a problem.
I hope you can understand have a nice day.
I am thinking of loading layout files at the beginning of my program and when the game state changes I will change the "sheet" too.But where should I register events? in functions which cause state changes? I mean should I register them after I change the sheet?
And what happens (if it is possible to) when reregistered? player goes from menu to game and again back to menu,which can cause reregistering.And do the windows keep their registered events, even if they are inactive? Another way could be to register events when loading layouts from files, so reregistering wouldn't be a problem.
I hope you can understand have a nice day.