Reloading a context/page

Help with integrating libRocket into your engine and game

Reloading a context/page

Postby jamesmintram on Sun Aug 12, 2012 4:55 pm

Hi everyone.

Currently I am developing a game where I have integrated libRocket (Awesome library!) However I would like to achieve quick iteration (Currently I can reload a page + scripts with ctrl+R)

With the way my engine works a new scene (identical to the current one) is created and loaded and then it replaces the current scene (So there are 2 active scenes for a period of time) Each scene has it's own context.

I have used: Rocket::Core::Factory::ClearStyleSheetCache(); when creating and loading the new scene which correctly causes all CSS styles to be reloaded however what I am having an issue with is getting the RML file to reload. Currently the content stays the same until I restart the application instead of reloading from the drive.

I assume libRocket recognises I am trying to load a document that is currently open in another context (Attached to the old scene that has not been torn down yet) and adds a reference to it or something? Or the data is being cached somewhere?

Is there a way to force libRocket to pull reload a page from the drive that I have missed? If not is there a way to fake it?

Regards,
James Mintram
jamesmintram
 
Posts: 2
Joined: Sun Aug 12, 2012 4:45 pm

Re: Reloading a context/page

Postby jamesmintram on Wed Aug 15, 2012 8:33 pm

This appears to work now, must have been something I had done wrong :)

Regards,
James Mintram
jamesmintram
 
Posts: 2
Joined: Sun Aug 12, 2012 4:45 pm


Return to Engine Integration


cron