]> Dogcows Code - chaz/yoink/blobdiff - src/Hud.cc
new level-based controllers
[chaz/yoink] / src / Hud.cc
index ea0dfeaef564202a32af2e569fa847501d7354a8..c535da5a5808d854899e270d243ecb8c8a7b1302 100644 (file)
@@ -130,9 +130,9 @@ Hud::Hud() :
 void Hud::resize(int width, int height)
 {
        cml::matrix_orthographic_RH( projection_, 
-                       0.0, 
-                       Mf::Scalar(width), 0.0, Mf::Scalar(height),
-                       1.0, -1.0, cml::z_clip_neg_one);
+                       0.0f
+                       Mf::Scalar(width), 0.0f, Mf::Scalar(height),
+                       1.0f, -1.0f, cml::z_clip_neg_one);
 
        // position the two progress bars at the top-left of the screen
        bar1_.resize(Mf::Rectangle(20, height - 51,
@@ -171,6 +171,18 @@ void Hud::draw(Mf::Scalar alpha) const
        glPopMatrix();
 }
 
+bool Hud::handleEvent(Mf::Event& event)
+{
+       switch (event.type)
+       {
+               case SDL_VIDEORESIZE:
+                       resize(event.resize.w, event.resize.h);
+                       break;
+       }
+
+       return false;
+}
+
 
 /** vim: set ts=4 sw=4 tw=80: *************************************************/
 
This page took 0.023762 seconds and 4 git commands to generate.