Complete GUI reload (including resources from disk)
Posted: Sun Oct 24, 2010 13:26
Hi all.
I have a question that I have not been able to find the answer to on/in the forums/tutorials. I'd like to be able to do a complete GUI reload from within the GUI. This might seem strange but I have all of my GUI code in Lua/XML and for prototyping the GUI it would be awesome to be able to press Ctrl+r to reload the GUI from disk (as you can in WoW for example, when developing addons).
I can think of one way to do this, completely unload the GUI rendering subsystem and then bring it up again, but that is a pretty long road to take ;o) Is there any quicker way to get it done? I have seen the invalidateAllCachedRendering() call but I can't see from the doc if this just invalidates all the resources for the layout and reuses the loaded images and such to redraw or if it does a deep reload of the GUI from disk (I figured the first since it is not really made for the purpose I need it for). Anyway I figured that you might get away with first reloading the resources from disk manually and then calling that function to get a complete redraw with the refreshed resources.
What do you all think?
I have a question that I have not been able to find the answer to on/in the forums/tutorials. I'd like to be able to do a complete GUI reload from within the GUI. This might seem strange but I have all of my GUI code in Lua/XML and for prototyping the GUI it would be awesome to be able to press Ctrl+r to reload the GUI from disk (as you can in WoW for example, when developing addons).
I can think of one way to do this, completely unload the GUI rendering subsystem and then bring it up again, but that is a pretty long road to take ;o) Is there any quicker way to get it done? I have seen the invalidateAllCachedRendering() call but I can't see from the doc if this just invalidates all the resources for the layout and reuses the loaded images and such to redraw or if it does a deep reload of the GUI from disk (I figured the first since it is not really made for the purpose I need it for). Anyway I figured that you might get away with first reloading the resources from disk manually and then calling that function to get a complete redraw with the refreshed resources.
What do you all think?