浏览代码

Add libRocket to PandaSystem

rdb 10 年之前
父节点
当前提交
4d2cf29816
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      panda/src/rocket/config_rocket.cxx

+ 8 - 0
panda/src/rocket/config_rocket.cxx

@@ -53,6 +53,10 @@ init_librocket() {
   RocketInputHandler::init_type();
   RocketRegion::init_type();
 
+  if (rocket_cat->is_debug()) {
+    rocket_cat->debug() << "Initializing libRocket library.\n";
+  }
+
   RocketFileInterface* fi = new RocketFileInterface;
   Rocket::Core::SetFileInterface(fi);
 
@@ -61,6 +65,10 @@ init_librocket() {
 
   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 HAVE_FREETYPE
   // Load Panda's default compiled-in freetype font (Perspective Sans).