Changeset 3368 in orxonox.OLD for orxonox/trunk/src/glmenu_imagescreen.cc
- Timestamp:
- Jan 7, 2005, 2:44:22 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/glmenu_imagescreen.cc
r3367 r3368 81 81 this->backTex = new Texture(); 82 82 this->backTex->loadImage("load_screen.jpg"); 83 84 this->maxValue = 10; 85 this->currentValue = 0; 83 86 84 87 // End of Background image code. … … 147 150 148 151 /* loadbar pos */ 149 int barX = 400;152 int barX = 390; 150 153 int barY = 50; 151 154 int barWidth = 230; 152 155 int barHeight = 30; 156 157 int val = ((float)this->currentValue/(float)this->maxValue) * barWidth; 153 158 154 159 glMatrixMode(GL_PROJECTION); … … 168 173 glColor3f(0.96, 0.84, 0.34); 169 174 glVertex2i(barX, barY); 175 glVertex2i(barX + val, barY); 176 glVertex2i(barX + val, barY + barHeight); 177 glVertex2i(barX, barY + barHeight); 178 glColor3f(1.0, 1.0, 1.0); 179 glEnd(); 180 181 glBegin(GL_QUADS); 182 glColor3f(0.0, 0.0, 0.0); 183 glVertex2i(barX, barY); 170 184 glVertex2i(barX + barWidth, barY); 171 185 glVertex2i(barX + barWidth, barY + barHeight); 172 186 glVertex2i(barX, barY + barHeight); 187 glColor3f(1.0, 1.0, 1.0); 188 glEnd(); 189 190 /* draw black border */ 191 glBegin(GL_QUADS); 192 glColor3f(0.0, 0.0, 0.0); 193 glVertex2i(barX-1, barY-1); 194 glVertex2i(barX + barWidth +1, barY-1); 195 glVertex2i(barX + barWidth+1, barY + barHeight+1); 196 glVertex2i(barX - 1, barY + barHeight +1); 197 glColor3f(1.0, 1.0, 1.0); 198 glEnd(); 199 200 /* draw white border */ 201 glBegin(GL_QUADS); 202 glColor3f(1.0, 1.0, 1.0); 203 glVertex2i(barX-2, barY-2); 204 glVertex2i(barX + barWidth +2, barY-2); 205 glVertex2i(barX + barWidth+2, barY + barHeight+2); 206 glVertex2i(barX - 2, barY + barHeight +2); 173 207 glColor3f(1.0, 1.0, 1.0); 174 208 glEnd(); … … 190 224 191 225 SDL_GL_SwapBuffers(); 192 SDL_Delay(5000);193 226 } 194 227 … … 224 257 \param maximum of steps 225 258 */ 226 void GLMenuImageScreen::setMaximum(int max Step)227 { 228 this->max Step = maxStep;259 void GLMenuImageScreen::setMaximum(int maxValue) 260 { 261 this->maxValue = maxValue; 229 262 } 230 263 … … 235 268 int GLMenuImageScreen::getMaximum() 236 269 { 237 return this->max Step;270 return this->maxValue; 238 271 } 239 272 … … 267 300 { 268 301 this->currentValue++; 269 } 302 this->draw(); 303 }
Note: See TracChangeset
for help on using the changeset viewer.