Some beginner questions
Posted: Sat May 07, 2011 15:10
Hello,
I'm relatively new to CEGUI (Amazing work by the way) and I'm facing some strange behavior. I also have some questions. I'm sorry to gather all those stuff in a single post. I didn't like doing that but I promise there are small things.
1) I was looking for a method in the listbox class to remove every items from it. I didn't find anything in the API so I done it manually. Is there a better way doing that? have I miss something?
2) I load every window elements from layout files. For some reasons, on some of those windows I need to unregister every events that could be associated with those window right after the loading. But after calling removeAllEvents on a window I'm no more able to set some properties correctly (like the Text). For example if a called setText after removeAllEvents the windows didn't displays the new text. However other properties like Alpha or Visible keeps "working". I didnt look in the CEGUI code but I suppose some events are registered to update the window once setText is called and I just unregister them. So it's not trigged anymore and the window text isn't updated. But why other properties are still "working" ? What am I doing wrong?
3) I load some LUA scripts in the application but their functionalities are not needed the entire application's lifetime. How can I unload scripts from the script module? Have I to recreate a new module every time a LUA script become useless?
I didn't post CEGUI log because I'm not facing any errors. But if you want more informations, I will post log + code fragments.
Thanks for taking time to read this post. Any answers would be appreciated.
Cheers
PS: Sorry for my bad English!
I'm relatively new to CEGUI (Amazing work by the way) and I'm facing some strange behavior. I also have some questions. I'm sorry to gather all those stuff in a single post. I didn't like doing that but I promise there are small things.
1) I was looking for a method in the listbox class to remove every items from it. I didn't find anything in the API so I done it manually. Is there a better way doing that? have I miss something?
2) I load every window elements from layout files. For some reasons, on some of those windows I need to unregister every events that could be associated with those window right after the loading. But after calling removeAllEvents on a window I'm no more able to set some properties correctly (like the Text). For example if a called setText after removeAllEvents the windows didn't displays the new text. However other properties like Alpha or Visible keeps "working". I didnt look in the CEGUI code but I suppose some events are registered to update the window once setText is called and I just unregister them. So it's not trigged anymore and the window text isn't updated. But why other properties are still "working" ? What am I doing wrong?
3) I load some LUA scripts in the application but their functionalities are not needed the entire application's lifetime. How can I unload scripts from the script module? Have I to recreate a new module every time a LUA script become useless?
I didn't post CEGUI log because I'm not facing any errors. But if you want more informations, I will post log + code fragments.
Thanks for taking time to read this post. Any answers would be appreciated.
Cheers
PS: Sorry for my bad English!