Changeset 6883 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jan 31, 2006, 2:44:16 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/simple_game_menu.cc
r6878 r6883 174 174 this->menuStartGame = dynamic_cast<ImageEntity*>(*entity); 175 175 this->menuStartGame->setBindNode((const PNode*)NULL); 176 this->menuStartGame->setRelCoor2D(State::getResX() / 2.0f, State::getResY() / 2.0f + (this->menuLayer[0]->menuList.size() * 50.0f), 0.0f); 176 this->menuStartGame->setRelCoor2D(State::getResX() / 2.0f, 177 State::getResY() / 2.0f - 60.0f, 178 0.0f); 177 179 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 178 180 … … 182 184 this->menuStartMultiplayerGame = dynamic_cast<ImageEntity*>(*entity); 183 185 this->menuStartMultiplayerGame->setBindNode((const PNode*)NULL); 184 this->menuStartMultiplayerGame->setRelCoor2D(State::getResX() / 2.0f, State::getResY() / 2.0f + (this->menuLayer[0]->menuList.size() * 50.0f), 0.0f); 186 this->menuStartMultiplayerGame->setRelCoor2D(State::getResX() / 2.0f, 187 State::getResY() / 2.0f + ((this->menuLayer[0]->menuList.size() -1 ) * 60.0f), 188 0.0f); 185 189 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 186 190 } … … 189 193 this->menuQuitGame = dynamic_cast<ImageEntity*>(*entity); 190 194 this->menuQuitGame->setBindNode((const PNode*)NULL); 191 this->menuQuitGame->setRelCoor2D(State::getResX() / 2.0f, State::getResY() / 2.0f + (this->menuLayer[0]->menuList.size() * 50.0f), 0.0f); 195 this->menuQuitGame->setRelCoor2D(State::getResX() / 2.0f, 196 State::getResY() / 2.0f + ((this->menuLayer[0]->menuList.size() -1 )* 60.0f), 197 0.0f); 192 198 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 193 199 } … … 214 220 ie->setVisibility(false); 215 221 ie->setBindNode((const PNode*)NULL); 216 ie->setRelCoor2D(State::getResX() / 2.0f, State::getResY() / 2.0f + (this->menuLayer[1]->menuList.size() * 50.0f), 0.0f); 222 ie->setRelCoor2D(State::getResX() / 2.0f - 200.0f, State::getResY() / 2.0f + ((this->menuLayer[1]->menuList.size() - 2.0f) * 60.0f), 0.0f); 223 ie->setSize2D(100.0f, 50.0f); 217 224 this->menuLayer[1]->menuList.push_back(ie); 218 225 … … 220 227 ie = new ImageEntity(); 221 228 ie->setTexture(se->getMenuScreenshoot()); 222 //ie->setRelCoor(10.0f, 10.0f, 0.0f);223 229 ie->setVisibility(false); 224 230 ie->setBindNode((const PNode*)NULL); 225 ie->setRelCoor2D(State::getResX() / 2.0f + 200.0f, State::getResY() / 2.0f, 0.0f); 231 ie->setRelCoor2D(State::getResX() / 2.0f + 250.0f, State::getResY() / 2.0f, 0.0f); 232 ie->setSize2D(100.0f, 75.0f); 226 233 this->menuLayer[1]->screenshootList.push_back(ie); 227 234 } … … 359 366 this->menuSelected = this->menuLayer[this->layerIndex]->menuList[++this->menuSelectedIndex]; 360 367 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 368 369 if( this->layerIndex == 1) 370 { 371 this->menuLayer[1]->screenshootList[this->menuSelectedIndex]->setVisibility(true); 372 this->menuLayer[1]->screenshootList[this->menuSelectedIndex-1]->setVisibility(false); 373 } 361 374 } 362 375 } … … 367 380 this->menuSelected = this->menuLayer[this->layerIndex]->menuList[--this->menuSelectedIndex]; 368 381 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 382 383 if( this->layerIndex == 1) 384 { 385 this->menuLayer[1]->screenshootList[this->menuSelectedIndex]->setVisibility(true); 386 this->menuLayer[1]->screenshootList[this->menuSelectedIndex+1]->setVisibility(false); 387 } 369 388 } 370 389 } … … 404 423 (*it)->setVisibility(true); 405 424 } 406 //also fade the screenshots if in level choosement mode407 for( it = this->menuLayer[layer1]->screenshootList.begin(); it != this->menuLayer[layer1]->screenshootList.end(); it++)408 {409 (*it)->setVisibility(true);410 }411 425 412 426 … … 415 429 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 416 430 this->menuSelectedIndex = 0; 431 432 if( layer2 == 1) 433 this->menuLayer[layer2]->screenshootList[0]->setVisibility(true); 417 434 } 418 435
Note: See TracChangeset
for help on using the changeset viewer.