diff options
| author | Samu Laaksonen <laaksonen.sj@gmail.com> | 2012-09-28 22:36:58 +0300 |
|---|---|---|
| committer | Samu Laaksonen <laaksonen.sj@gmail.com> | 2012-09-28 22:36:58 +0300 |
| commit | 1cf5a427a829b22abea7027b18a130a01da3ed6a (patch) | |
| tree | 9076e816e052bb35e52890a13562844090312be5 /src/BarDisplay.h | |
| parent | 685fe05def77b039221edf06c74af74915d536c5 (diff) | |
| download | prism-1cf5a427a829b22abea7027b18a130a01da3ed6a.tar.gz prism-1cf5a427a829b22abea7027b18a130a01da3ed6a.zip | |
Rename commit
Renamed some files according the project name
Added base directory structure for resources
Changed more fitting parallax scrolled background to menus
- added 3 new layers as resources
Changed more cheerful buttons to menus
Added base classes to build HUD later on
Added one new test level that is size of 800*480 with tilesize of 32*32
Diffstat (limited to 'src/BarDisplay.h')
| -rw-r--r-- | src/BarDisplay.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/BarDisplay.h b/src/BarDisplay.h new file mode 100644 index 0000000..4980f8b --- /dev/null +++ b/src/BarDisplay.h @@ -0,0 +1,33 @@ +#ifndef BarDisplay_h +#define BarDisplay_h + +#include <QGraphicsItem> + +class BarDisplay : public QGraphicsItem +{ +public: + BarDisplay(QGraphicsItem* parent = 0); + virtual ~BarDisplay(); + + virtual QRectF boundingRect() const; + virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + + void collected(int); + void consumed(int); + void setDisplayColor(QColor col); + +signals: + +public slots: + +private: + int m_partCount; + int m_value; + int m_maxValue; + QColor m_displayColor; + + void updateDisplay(); + +}; + +#endif // BarDisplay_h |
