added variables for crystal icons in interface class
This commit is contained in:
+8
-4
@@ -11,6 +11,9 @@ void glutBitmapString(std::string str, int x, int y);
|
|||||||
|
|
||||||
Interface::Interface()
|
Interface::Interface()
|
||||||
{
|
{
|
||||||
|
crystalWidth = 20;
|
||||||
|
crystalHeight = 50;
|
||||||
|
crystalOffset = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87,11 +90,12 @@ void Interface::draw()
|
|||||||
{
|
{
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glColor4f(0, 1.0f, 1.0f, 1.0f);
|
glColor4f(0, 1.0f, 1.0f, 1.0f);
|
||||||
glVertex2f(975 - cw / 2, offset*i + ch*i);
|
glVertex2f(975 - crystalWidth / 2, crystalOffset*i + crystalHeight*i);
|
||||||
glVertex2f(975 - cw , ch / 2 + offset*i + ch*i);
|
glVertex2f(975 - crystalWidth, crystalHeight / 2 + crystalOffset*i + crystalHeight*i);
|
||||||
|
|
||||||
glColor4f(0, 0.8f, 0.8f, 1.0f);
|
glColor4f(0, 0.8f, 0.8f, 1.0f);
|
||||||
glVertex2f(975 - cw / 2, ch + offset*i + ch*i);
|
glVertex2f(975 - crystalWidth / 2, crystalHeight + crystalOffset*i + crystalHeight*i);
|
||||||
glVertex2f(975 , ch / 2 + offset*i + ch*i);
|
glVertex2f(975, crystalHeight / 2 + crystalOffset*i + crystalHeight*i);
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,7 @@ public:
|
|||||||
|
|
||||||
void draw(void);
|
void draw(void);
|
||||||
void update(float deltaTime);
|
void update(float deltaTime);
|
||||||
|
|
||||||
|
int crystalWidth, crystalHeight, crystalOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user