]> Dogcows Code - chaz/yoink/blobdiff - src/Hud.cc
sockets documentation and cleanup
[chaz/yoink] / src / Hud.cc
index f4134cf737fd468acee3b76acc5a3166bfc00611..28b7c3487f8fbbbd0184bf725bd164f5ae5dafa6 100644 (file)
@@ -10,7 +10,6 @@
 **************************************************************************/
 
 #include <Moof/Aabb.hh>
-#include <Moof/Core.hh>
 #include <Moof/Log.hh>
 #include <Moof/OpenGL.hh>
 #include <Moof/Video.hh>
@@ -111,9 +110,9 @@ Hud::Hud(GameState& state) :
        mBar2(Mf::Texture("StatusBars"), 2),
        mFont("Font")
 {
-       ASSERT(Mf::video &&
-                  "no current video context from which to get dimensions");
-       resize(Mf::video->getWidth(), Mf::video->getHeight());
+       Mf::Video* video = Mf::Video::current();
+       ASSERT(video && "a current video context should be set");
+       resize(video->getWidth(), video->getHeight());
 }
 
 
@@ -174,7 +173,8 @@ bool Hud::handleEvent(const Mf::Event& event)
                        if (event.key.keysym.sym == SDLK_h)
                        {
                                // don't want the hud anymore
-                               Mf::core.pop(this);
+                               parent().removeChild(this);
+
                                Mf::logWarning("okay bye bye hud");
                                return true;
                        }
This page took 0.020256 seconds and 4 git commands to generate.