I have updated the Awesomium XNA component to use Awesomium 1.7.1. The most noticeable changes are: improved performance, syntax changes for various tasks, and the lack of smooth fonts over transparent backgrounds.
For performance, my credits screen no longer jerks (at least on my computer), and the performance graph isn’t causing performance issues. Yay!
// Awesomium 1.6 awesomium.WebView.CreateObject("xna"); awesomium.WebView.SetObjectCallback("xna", "StartWorld", StartWorld); awesomium.WebView.SetObjectCallback("xna", "Exit", Exit);
You do this:
Not pretty, but it works. If you know of a better way, leave it in the comments.
Next major change is how pages are loaded. In Awesomium 1.6, you could do this:
WebCore.BaseDirectory = @"..\UI\"; awesomium.WebView.LoadFile("MainMenu.html");
And in 1.7.1 they’re pushing for people to use DataSources, but you can still get by using:
awesomium.WebView.Source = (Environment.CurrentDirectory + @"\..\UI\MainMenu.html").ToUri();
Last but not least, fonts are rendered opaquely over transparent backgrounds. This ends up making the soft edges of letters render black. Not great. There are ways around this, but I haven’t looked in to them too much.