- Timestamp:
- Jan 7, 2005, 2:44:22 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 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 } -
orxonox/trunk/src/glmenu_imagescreen.h
r3367 r3368 32 32 void setSize (float height, float width); 33 33 34 void setMaximum (int max Step);34 void setMaximum (int maxValue); 35 35 int getMaximum (); 36 36 void setValue (int currentValue); … … 44 44 Texture* backTex; //! background texture 45 45 int currentValue; //! the current count of step() calls fired yet 46 int max Step; //! total count of steps46 int maxValue; //! total count of steps 47 47 48 48 }; -
orxonox/trunk/src/world.cc
r3365 r3368 148 148 149 149 //GLMenuImageScreen* 150 glmis = new GLMenuImageScreen(); 151 glmis->init(); 152 glmis->draw(); 150 this->glmis = new GLMenuImageScreen(); 151 this->glmis->init(); 152 this->glmis->setMaximum(10); 153 this->glmis->draw(); 153 154 154 155 printf ("World::displayLoadScreen - end\n"); … … 159 160 { 160 161 printf ("World::releaseLoadScreen - start\n"); 161 162 this->glmis->setValue(this->glmis->getMaximum()); 163 SDL_Delay(2000); 162 164 printf ("World::releaseLoadScreen - end\n"); 163 165 } … … 226 228 trackManager->join(4, fork21, fork22, fork13, fork14); 227 229 230 /*monitor progress*/ 231 this->glmis->step(); 232 228 233 /* 229 234 tmpCurve->addNode(Vector(10,0,-10)); … … 272 277 myPlayer->setName ("player"); 273 278 this->spawn (myPlayer); 274 this->localPlayer = myPlayer; 279 this->localPlayer = myPlayer; 280 281 /*monitor progress*/ 282 this->glmis->step(); 275 283 276 284 // bind input … … 283 291 this->getCamera()->bind (myPlayer); 284 292 this->localPlayer->addChild (this->localCamera); 285 293 294 /*monitor progress*/ 295 this->glmis->step(); 286 296 287 297 Vector* es = new Vector (50, 2, 0); … … 290 300 env->setName ("env"); 291 301 this->spawn(env, es, qs); 292 302 303 /*monitor progress*/ 304 this->glmis->step(); 293 305 294 306 break;
Note: See TracChangeset
for help on using the changeset viewer.