I'm very happy to announce the final release of NaviLibrary v1.5.
If you're new to NaviLibrary, it's basically a library that lets you write your GUI using HTML/CSS/Javascript. That's really just the tip of the iceberg-- for example, with NaviLibrary you could render web advertisements to a 3D billboard or even let your users interface with an online discussion board directly from within your game-- the possibilities are limited only by your imagination.
If you've used NaviLibrary before, I hope that you will find the new API much cleaner and more intuitive than the previous iteration.
Summary of changes:
API Changes since v1.4:
- In NaviManager:
-- NaviManager::GetPointer has been added
-- NaviManager::Startup has been merged into the constructor for NaviManager.
-- NaviManager::Shutdown no longer exists, just delete NaviManager instead.
-- You must instantiate (new NaviManager(renderWin)) NaviManager before accessing the singleton via NaviManager::Get/NaviManager::GetPointer.
-- NaviManager's constructor now also lets you specify the directory of your gecko runtime folders, this is by default 'GeckoRuntime'.
-- Massive refactoring of interface. Manipulation of Navis by name through NaviManager is no longer supported. NaviManager is now purely for the creation/destruction of Navis, global input injection, and methods that affect mass number of Navis. To manipulate individual Navis, you should obtain a direct pointer to a Navi from NaviManager and then manipulate it using the public interface of the Navi itself.
--- NaviManager::createNavi/createNaviMaterial return pointers to the Navis that are created.
--- NaviManager::createNavi/createNaviMaterial have lost several parameters
--- NaviManager::getNavi looks up a Navi by name and returns a pointer to the Navi; if the Navi is not found, returns 0.
--- NaviManager::StartupMouse and NaviManager::getMouse have been removed. The NaviMouse singleton should now be instantiated separately.
- In Navi:
-- Massive refactoring of interface, a plethora of member functions are now public.
-- Many of the methods for Navi manipulation that were previously only available through NaviManager have been refactored directly into Navi.
-- Most of the setter methods return a pointer to the Navi that it was invoked on to allow chaining of setters.
-- Navi::getExtents has been added
-- Navi::evaluateJS now has an optional second parameter (NaviUtilities::Args, a vector of variants) that lets you evaluate the Javascript as a template (use '?' as the pseudo-character, strings will automatically be quoted).
- In NaviMouse:
-- Is now a true singleton. You must instantiate it (new NaviMouse()) before accessing it via NaviMouse::Get/GetPointer.
-- It's constructor now takes two new, initial arguments: width and height.
-- It's destructor is now private-- the destructor of NaviManager destroys NaviMouse
-- NaviCursor::getName has been added
- In NaviUtilities:
-- NaviUtilities::limit has been added. It is a simple, templated helper that limits a number between two numbers.
-- NaviUtilities::MultiValue is a new variant class (formerly NaviDataValue)
-- NaviUtilities::Args is a new InlineVector, similar to NaviUtilities::Strings, but can take several different types (MultiValue).
-- NaviUtilities::stringTemplate and logTemplate have been added.
- In NaviEventListener:
-- Has been modified considerably, two more events have been added. Parameters have been modified (now each event passes a pointer to the calling Navi instead of the name), onNaviLinkClicked has been renamed to onLinkClicked.
- In NaviDemo:
-- Has been greatly modified to use the new interface scheme. Look to it for suggestions on how to implement the new changes.
- In the VC8 Solution:
-- Two new configurations: Release DLL and Debug DLL. If you intend to use these configurations, you must link to 'Navi_DLL.lib' (use 'Navi_d_DLL.lib' for debug), and copy 'Navi.dll' (use 'Navi_d.dll' for debug) to your application's working directory.
- In the dependencies and file-system:
-- The Gecko runtime folders (components, res, chrome, etc.) have now been wrapped by a 'GeckoRuntime' folder. See the NaviManager constructor to change this runtime directory.
-- LLMozLib has been modified so that it does not limit the max number of browser windows
-- There was a bug in LLMozLib with sending update notification events to Navi when the window handle (HWND) a browser window was created with was not the top-level window. This obviously created some problems with embedding NaviLibrary inside of an external GUI (such as wxWidgets). This bug has been squashed thanks to the efforts of Pagghiu (details of the changes can be found on the wiki as LLMozLib_ChildWindow_Patch).
Core Changes since v1.4:
- New template class 'NaviLibrary::Singleton' has been created to make the NaviManager Singleton safer and more manageable. It is mostly a carbon-copy of Ogre's Singleton except with different accessors (Singleton::Get()/Singleton::GetPointer()) and verbose exceptions.
- DLL support!
- Much of the code in Navi, NaviManager, and NaviMouse has been refactored/simplified.
- NaviMouse now supports arbitrary widths/heights of cursors
- NaviDemo has been refactored, the debug overlay has been minimized, and the scene has been changed up.
Bugfixes since v1.4:
- Textures loaded from an image refuse to give up their data via read-only locks in OpenGL-mode in Ogre3D. (Thus, Navis with masks would be invisible in OpenGL). A workaround has been applied.
- NaviMouse now properly restores its internal texture when it has been lost (usually after a window resize).
- Several VC7 incompatibilities have been resolved under the guidance of g6r6e6g.
- A texture corruption bug with NaviMouse has been corrected thanks to g6r6e6g.