*/
#include <Moof/Drawable.hh>
+#include <Moof/Layer.hh>
#include <Moof/Math.hh>
#include <Moof/Rectangle.hh>
-#include <Moof/Tilemap.hh>
+
+#include "Tilemap.hh"
class ProgressBar : public Mf::Drawable
{
public:
- ProgressBar(const Mf::Tilemap& tilemap, Mf::Tilemap::Index index);
+ ProgressBar(const Tilemap& tilemap, Tilemap::Index index);
void resize(const Mf::Rectangle& rect);
Mf::Vector2 vertices_[8];
Mf::Scalar width_;
- Mf::Tilemap tilemap_;
+ Tilemap tilemap_;
Mf::Scalar texCoords_[8];
Mf::Scalar midCoords_[2];
};
-class Hud : public Mf::Drawable
+class Hud;
+typedef boost::shared_ptr<Hud> HudP;
+
+class Hud : public Mf::Layer
{
public:
Hud();
+ static HudP alloc()
+ {
+ return HudP(new Hud);
+ }
+
void setBar1Progress(Mf::Scalar progress)
{
// pass through
void resize(int width, int height);
void draw(Mf::Scalar alpha = 0.0) const;
+ bool handleEvent(Mf::Event& event);
private:
ProgressBar bar2_;
unsigned number_;
- Mf::Tilemap font_;
+ Tilemap font_;
Mf::Matrix4 projection_;
};