X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FHud.hh;h=966ae43bf54a553ace4aedefe65a98eed98c1d17;hb=a4debfe4a5f5d339410788971b698ba00cb7f09c;hp=813e67fcdee2b5bff28522e73eda4fa09c5b7383;hpb=bfa6212d09d8735d8fd5e2638188e4a99f21ada4;p=chaz%2Fyoink diff --git a/src/Hud.hh b/src/Hud.hh index 813e67f..966ae43 100644 --- a/src/Hud.hh +++ b/src/Hud.hh @@ -35,6 +35,7 @@ */ #include +#include #include #include #include @@ -65,19 +66,27 @@ private: }; -class Hud : public Mf::Drawable +class Hud; +typedef boost::shared_ptr 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: