Implemented Yoshi's Island-style flapping (based on Wansti's code) and force-activate...
[supertux.git] / src / object / text_object.cpp
index 03ca2b4..7ad34c4 100644 (file)
@@ -5,7 +5,7 @@
 #include "video/drawing_context.h"
 
 TextObject::TextObject()
-  : visible(false)
+  : fading(0), fadetime(0), visible(false)
 {
   font = blue_text;
 }
@@ -25,8 +25,6 @@ TextObject::set_font(const std::string& name)
     font = blue_text;
   } else if(name == "gray") {
     font = gray_text;
-  } else if(name == "white") {
-    font = white_text;
   } else if(name == "big") {
     font = white_big_text;
   } else if(name == "small") {
@@ -79,14 +77,14 @@ TextObject::draw(DrawingContext& context)
   }
 
   context.draw_filled_rect(Vector(125, 50), Vector(550, 120),
-      Color(150, 180, 200, 125), LAYER_GUI-10);
-  context.draw_text(font, text, Vector(125+35, 50+35), LEFT_ALLIGN, LAYER_GUI);
+      Color(150, 180, 200, 125), LAYER_GUI-50);
+  context.draw_text(font, text, Vector(125+35, 50+35), LEFT_ALLIGN, LAYER_GUI-40);
 
   context.pop_transform();
 }
 
 void
-TextObject::action(float elapsed_time)
+TextObject::update(float elapsed_time)
 {
   if(fading > 0) {
     fading -= elapsed_time;