for c in s:
glutBitmapCharacter(OpenGL.GLUT.GLUT_BITMAP_HELVETICA_18, ord(c))
+def glDrawQuad(x, y, w, h):
+ glPushMatrix()
+ glTranslatef(x, y, 0)
+ glDisable(GL_TEXTURE_2D)
+ glBegin(GL_QUADS)
+ glVertex2f(w, 0)
+ glVertex2f(0, 0)
+ glVertex2f(0, h)
+ glVertex2f(w, h)
+ glEnd()
+ glPopMatrix()
+
def glDrawTexturedQuad(x, y, w, h, texID, mirror = 0):
tx = float(texID % 4) / 4
ty = float(int(texID / 4)) / 8
glPopMatrix()
progress = self._progressBar
if progress is not None:
- glColor4ub(255,255,255,192)
- opengl.glDrawTexturedQuad(pos[0]-bs/2, pos[1]+bs/2, bs, bs / 4, 0)
+ glColor4ub(60,60,60,255)
+ opengl.glDrawQuad(pos[0]-bs/2, pos[1]+bs/2, bs, bs / 4)
glColor4ub(255,255,255,255)
- opengl.glDrawTexturedQuad(pos[0]-bs/2, pos[1]+bs/2, bs * progress, bs / 4, 0)
+ opengl.glDrawQuad(pos[0]-bs/2+2, pos[1]+bs/2+2, (bs - 5) * progress + 1, bs / 4 - 4)
elif len(self._altTooltip) > 0:
glPushMatrix()
glTranslatef(pos[0], pos[1], 0)