]> Dogcows Code - chaz/yoink/blobdiff - src/Hud.hh
fixed layer bugs; generalized octree
[chaz/yoink] / src / Hud.hh
index 813e67fcdee2b5bff28522e73eda4fa09c5b7383..966ae43bf54a553ace4aedefe65a98eed98c1d17 100644 (file)
@@ -35,6 +35,7 @@
  */
 
 #include <Moof/Drawable.hh>
+#include <Moof/Layer.hh>
 #include <Moof/Math.hh>
 #include <Moof/Rectangle.hh>
 #include <Moof/Tilemap.hh>
@@ -65,19 +66,27 @@ private:
 };
 
 
-class Hud : public Mf::Drawable
+class Hud;
+typedef boost::shared_ptr<Hud> HudP;
+
+class Hud : public Mf::Layer
 {
 public:
 
        Hud();
 
-       inline void setBar1Progress(Mf::Scalar progress)
+       static HudP alloc()
+       {
+               return HudP(new Hud);
+       }
+
+       void setBar1Progress(Mf::Scalar progress)
        {
                // pass through
                bar1_.setProgress(progress);
        }
 
-       inline void setBar2Progress(Mf::Scalar progress)
+       void setBar2Progress(Mf::Scalar progress)
        {
                // pass through
                bar2_.setProgress(progress);
@@ -88,6 +97,7 @@ public:
        void resize(int width, int height);
 
        void draw(Mf::Scalar alpha = 0.0) const;
+       bool handleEvent(Mf::Event& event);
 
 private:
 
This page took 0.021079 seconds and 4 git commands to generate.