Attempt implement menu (unresolved symbol error)

This commit is contained in:
2016-06-09 17:56:37 +02:00
parent 0209c8b4e2
commit ced3ff4462
21 changed files with 370 additions and 64 deletions
+2 -13
View File
@@ -5,9 +5,7 @@
#include <string>
#include "Player.h"
//Prototype
void glutBitmapString(std::string str, int x, int y);
#include "Util.h"
Interface::Interface()
{
@@ -78,7 +76,7 @@ void Interface::draw()
//Text: level
glColor4f(1.0f, 1.0f, 0.1f, 1.0);
glutBitmapString("Level: " + std::to_string(player->level), 490, 900);
Util::glutBitmapString("Level: " + std::to_string(player->level), 490, 900);
int cw, ch, offset;
cw = 20;
@@ -104,13 +102,4 @@ void Interface::draw()
void Interface::update(float deltaTime)
{
}
void glutBitmapString(std::string str, int x, int y)
{
glRasterPos2f(x, y);
for (int i = 0; i < str.size(); i++)
{
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, str[i]);
}
}