1 #ifndef GRAPHICS_GAUGE_H_
2 #define GRAPHICS_GAUGE_H_
4 #include "../math/Vector.h"
13 static const int TYPE_ID = 406;
16 explicit Gauge(SDL_Surface *s = 0, int fullX = 0, int fullY = 0, int emptyX = 0, int emptyY = 0, int height = 1, int startWidth = 0, int repeatWidth = 1, int endWidth = 0)
17 : surface(s), fullOffset(fullX, fullY), emptyOffset(emptyX, emptyY), height(height), startWidth(startWidth), repeatWidth(repeatWidth), endWidth(endWidth) { }
20 int MinWidth() const { return startWidth + endWidth; }
21 int Height() const { return height; }
22 void Draw(SDL_Surface *dest, const math::Vector<int> &position, int width, Uint8 fill) const;
25 void SetSurface(SDL_Surface *s) { surface = s; }
26 void SetFullOffset(const math::Vector<int> &o) { fullOffset = o; }
27 void SetEmptyOffset(const math::Vector<int> &o) { emptyOffset = o; }
28 void SetHeight(int h) { height = h; }
29 void SetStartWidth(int w) { startWidth = w; }
30 void SetRepeatWidth(int w) { repeatWidth = w; }
31 void SetEndWidth(int w) { endWidth = w; }
33 static void CreateTypeDescription();
34 static void Construct(void *);
38 math::Vector<int> fullOffset;
39 math::Vector<int> emptyOffset;