add code to debug collision rectangles
[supertux.git] / src / object / text_object.cpp
index 8081e85..3693912 100644 (file)
@@ -5,7 +5,8 @@
 #include <iostream>
 #include "resources.hpp"
 #include "video/drawing_context.hpp"
-#include "msg.hpp"
+#include "scripting/wrapper_util.hpp"
+#include "log.hpp"
 
 TextObject::TextObject()
   : fading(0), fadetime(0), visible(false)
@@ -19,6 +20,19 @@ TextObject::~TextObject()
 }
 
 void
+TextObject::expose(HSQUIRRELVM vm, int table_idx)
+{
+  Scripting::Text* interface = static_cast<Scripting::Text*> (this);
+  Scripting::expose_object(vm, table_idx, interface, "Text", false);
+}
+
+void
+TextObject::unexpose(HSQUIRRELVM vm, int table_idx)
+{
+  Scripting::unexpose_object(vm, table_idx, "Text");
+}
+
+void
 TextObject::set_font(const std::string& name)
 {
   if(name == "gold") {
@@ -34,7 +48,7 @@ TextObject::set_font(const std::string& name)
   } else if(name == "small") {
     font = white_small_text;
   } else {
-    msg_warning("Unknown font '" << name << "'.");
+    log_warning << "Unknown font '" << name << "'." << std::endl;
   }
 }