diff options
author | Benjamin Cohen <bencoh@notk.org> | 2011-11-29 21:46:22 +0100 |
---|---|---|
committer | Benjamin Cohen <bencoh@notk.org> | 2011-11-29 21:46:22 +0100 |
commit | eec305c93536dabd30a1c38cd6270c2bdc8a5e98 (patch) | |
tree | 2bca9294de36fcbeeded9a7a3d84c05837289d40 /MainWindow.h | |
parent | 70955a55db7616b77fca0f2acdc3454fb08e71a2 (diff) |
- Add drawString method
- Display "PAUSE" when pausing game
Diffstat (limited to 'MainWindow.h')
-rw-r--r-- | MainWindow.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MainWindow.h b/MainWindow.h index d7a9577..e4e8e81 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -1,6 +1,15 @@ #ifndef _MAIN_WINDOW_H
#define _MAIN_WINDOW_H
+#ifdef APPLE_NATIVE_GLUT
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#include <GLUT/glut.h>
+#else
+#include <GL/freeglut.h>
+#endif
+
+
#include "types.h"
#include <string>
#include <vector>
@@ -10,6 +19,12 @@ #include "Game.h"
#include "KeyboardController.h"
+enum TextAlign {
+ right = -2,
+ center = -1,
+ left = 0
+};
+
// Functions defines for C callbacks
void f_onChangeSize(int w, int h);
void f_onTimer(int v=0);
@@ -56,6 +71,7 @@ public: // Callbacks private:
void onKeyPressed(KeyCode key);
void drawCell(uint Color);
+ void drawString(GLfloat x, GLfloat y, char *text, uint color, TextAlign align);
private:
static MainWindow s_mainWindow;
|