]>
Dogcows Code - chaz/yoink/blob - src/Hud.hh
05882ed0121f439250925846594991335bb13cad
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
8 *****************************************************************************/
18 #include <moof/drawable.hh>
19 #include <moof/math.hh>
20 //#include <moof/rectangle.hh>
21 #include <moof/sprite.hh>
23 #include "GameState.hh"
26 // forward declarations
29 // TODO this stuff is still just hacked up
31 class ProgressBar
: public moof::drawable
35 ProgressBar(const moof::sprite
& tilemap
, int index
);
37 void resize(const moof::rectangle
& rect
);
39 void setProgress(moof::scalar progress
);
41 void draw(moof::scalar alpha
= 0.0) const;
45 moof::scalar mProgress
;
47 moof::vector2 mVertices
[8];
50 moof::sprite mTilemap
;
51 moof::scalar mTexCoords
[8];
52 moof::scalar mMidCoords
[2];
57 typedef boost::shared_ptr
<Hud
> HudP
;
63 static HudP
alloc(GameState
& state
)
65 return HudP(new Hud(state
));
67 Hud(GameState
& state
);
70 void setBar1Progress(moof::scalar progress
)
73 mBar1
.setProgress(progress
);
76 void setBar2Progress(moof::scalar progress
)
79 mBar2
.setProgress(progress
);
82 void setNumber(unsigned value
);
84 void resize(int width
, int height
);
86 void update(moof::scalar t
, moof::scalar dt
);
87 void draw(moof::scalar alpha
= 0.0) const;
88 bool handle_event(const moof::event
& event
);
100 moof::matrix4 mProjection
;
This page took 0.032599 seconds and 4 git commands to generate.