aboutsummaryrefslogtreecommitdiff
path: root/src/ActionScene.cpp
diff options
context:
space:
mode:
authorSamu Laaksonen <laaksonen.sj@gmail.com>2012-10-19 21:36:44 +0300
committerSamu Laaksonen <laaksonen.sj@gmail.com>2012-10-19 21:36:44 +0300
commitfe15901cad4ccc90b5702cf5061849c1ab1fd40d (patch)
tree0148609d571ae7bc93a04acf8fc45647d057aaf1 /src/ActionScene.cpp
parenta0f7ab0f77fa81b77d03de751e4a5f4e07c49d25 (diff)
downloadprism-fe15901cad4ccc90b5702cf5061849c1ab1fd40d.tar.gz
prism-fe15901cad4ccc90b5702cf5061849c1ab1fd40d.zip
HUD improvement
Added - some placeholder graphics for HUD elements - just to demonstrate how HUD may be implemented with drawForeground of ActionScene
Diffstat (limited to 'src/ActionScene.cpp')
-rw-r--r--src/ActionScene.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ActionScene.cpp b/src/ActionScene.cpp
index cdf1602..8c6d374 100644
--- a/src/ActionScene.cpp
+++ b/src/ActionScene.cpp
@@ -19,6 +19,7 @@
#include "Hero.h"
#include "ParallaxScrollerStatic.h"
#include "Collectible.h"
+#include "HeadsUpDisplay.h"
#include "layer.h"
#include "objectgroup.h"
@@ -26,6 +27,8 @@
#include "tile.h"
#include "tilelayer.h"
+#include "Box2D/Dynamics/b2World.h"
+
#include "ActionScene.h"
using Tiled::Map;
@@ -46,6 +49,8 @@ ActionScene::ActionScene(const QString &name, const QRectF &rect, GameView *pare
m_map = 0;
m_mapRenderer = 0;
+ m_hud = new HeadsUpDisplay(sceneRect().width(), sceneRect().height(), this, this);
+
// start setting up the world here
//b2Vec2 gravity(0.0f, -10.0f);
//m_physicalWorld = new b2World(gravity);
@@ -120,7 +125,7 @@ void ActionScene::drawBackground(QPainter *painter, const QRectF &rect)
void ActionScene::drawForeground(QPainter *painter, const QRectF &rect)
{
-
+ painter->drawPixmap(0, 0, width(), height(), *m_hud);
}
void ActionScene::loadMap(QString target)