Add libRocket to PandaSystem

This commit is contained in:
rdb 2015-11-21 16:55:06 +01:00
parent 428f4ce050
commit 4d2cf29816

View File

@ -53,6 +53,10 @@ init_librocket() {
RocketInputHandler::init_type(); RocketInputHandler::init_type();
RocketRegion::init_type(); RocketRegion::init_type();
if (rocket_cat->is_debug()) {
rocket_cat->debug() << "Initializing libRocket library.\n";
}
RocketFileInterface* fi = new RocketFileInterface; RocketFileInterface* fi = new RocketFileInterface;
Rocket::Core::SetFileInterface(fi); Rocket::Core::SetFileInterface(fi);
@ -61,6 +65,10 @@ init_librocket() {
Rocket::Core::Initialise(); Rocket::Core::Initialise();
// Register that we have the libRocket system.
PandaSystem *ps = PandaSystem::get_global_ptr();
ps->add_system("libRocket");
#ifdef COMPILE_IN_DEFAULT_FONT #ifdef COMPILE_IN_DEFAULT_FONT
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
// Load Panda's default compiled-in freetype font (Perspective Sans). // Load Panda's default compiled-in freetype font (Perspective Sans).