[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/games/astrododge/src
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2009-07-03 19:29:42
Message-ID: 1246649382.614074.30136.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 991016 by rivol:
- Add GameGUIView which takes care of rendering in-game GUI.
- GLView now exposes its parent's textRenderer().
M +1 -0 CMakeLists.txt
A gameguiview.cpp [License: GPL (v3+)]
A gameguiview.h [License: GPL (v3+)]
M +5 -0 glview.cpp
M +2 -0 glview.h
M +2 -0 mainwindow.cpp
--- trunk/playground/games/astrododge/src/CMakeLists.txt #991015:991016
@@ -4,6 +4,7 @@
asteroid.cpp
bullet.cpp
displaywidget.cpp
+ gameguiview.cpp
gameobject.cpp
gameview.cpp
gameworld.cpp
--- trunk/playground/games/astrododge/src/glview.cpp #991015:991016
@@ -52,6 +52,11 @@
return glWidget()->fpsCounter();
}
+KGLLib::TextRenderer* GLView::textRenderer() const
+{
+ return glWidget()->textRenderer();
+}
+
void GLView::setViewType(GLView::ViewType v)
{
mViewType = v;
--- trunk/playground/games/astrododge/src/glview.h #991015:991016
@@ -25,6 +25,7 @@
class GLWidget;
class Camera;
class FPSCounter;
+ class TextRenderer;
}
class GLView : public QObject
@@ -51,6 +52,7 @@
protected:
KGLLib::Camera* camera() const;
KGLLib::FPSCounter* fpsCounter() const;
+ KGLLib::TextRenderer* textRenderer() const;
void setCamera(KGLLib::Camera* c);
void setViewType(ViewType v);
--- trunk/playground/games/astrododge/src/mainwindow.cpp #991015:991016
@@ -23,6 +23,7 @@
#include "bullet.h"
#include "gameview.h"
#include "displaywidget.h"
+#include "gameguiview.h"
#include <kgllib/widgetproxy.h>
@@ -108,6 +109,7 @@
mWorld = new GameWorld(this);
mView = new GameView(mDisplay, mWorld);
mDisplay->appendView(mView);
+ mDisplay->appendView(new GameGUIView(mDisplay, mWorld));
connect(mDisplay, SIGNAL(signalRotateShip(int,int)), mWorld, SLOT(slotRotateShip(int,int)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic