- Timestamp:
- Jan 31, 2006, 1:49:04 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r6778 r6878 148 148 149 149 // PNode-style: 150 LoadParam(root, "rel-coor ", this, Element2D, setRelCoor2D)150 LoadParam(root, "rel-coor-2d", this, Element2D, setRelCoor2D) 151 151 .describe("Sets The relative position of the Node to its parent."); 152 152 153 LoadParam(root, "abs-coor ", this, Element2D, setAbsCoor2D)153 LoadParam(root, "abs-coor-2d", this, Element2D, setAbsCoor2D) 154 154 .describe("Sets The absolute Position of the Node."); 155 155 156 LoadParam(root, "rel-dir ", this, Element2D, setRelDir2D)156 LoadParam(root, "rel-dir-2d", this, Element2D, setRelDir2D) 157 157 .describe("Sets The relative rotation of the Node to its parent."); 158 158 159 LoadParam(root, "abs-dir ", this, Element2D, setAbsDir2D)159 LoadParam(root, "abs-dir-2d", this, Element2D, setAbsDir2D) 160 160 .describe("Sets The absolute rotation of the Node."); 161 161 -
trunk/src/story_entities/game_world.cc
r6845 r6878 115 115 .describe("The Filename of this GameWorld (relative from the data-dir)"); 116 116 117 // LoadParam(root, "soundtrack", this->dataTank, GameWorldData, setSoundTrack);118 119 117 PRINTF(4)("Loaded GameWorld specific stuff\n"); 120 118 } -
trunk/src/story_entities/simple_game_menu.cc
r6874 r6878 64 64 65 65 this->loadParams(root); 66 67 State::setMenuMode(true); 66 68 } 67 69 … … 166 168 { 167 169 this->menuSelector = dynamic_cast<ImageEntity*>(*entity); 170 this->menuSelector->setBindNode((const PNode*)NULL); 168 171 } 169 172 else if( !strcmp( "StartGame_Menu", (*entity)->getName())) 170 173 { 171 174 this->menuStartGame = dynamic_cast<ImageEntity*>(*entity); 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); 172 177 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 173 178 … … 176 181 { 177 182 this->menuStartMultiplayerGame = dynamic_cast<ImageEntity*>(*entity); 183 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); 178 185 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 179 186 } … … 181 188 { 182 189 this->menuQuitGame = dynamic_cast<ImageEntity*>(*entity); 190 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); 183 192 this->menuLayer[0]->menuList.push_back(dynamic_cast<ImageEntity*>(*entity)); 184 193 } 185 194 } 195 this->menuSelected->getNullElement()->update2D(0.0f); 186 196 this->menuSelectedIndex = 0; 187 197 this->menuSelected = this->menuLayer[0]->menuList[this->menuSelectedIndex]; 188 this->menuSelector->setAbsCoor (this->menuSelected->getAbsCoor());198 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 189 199 190 200 … … 202 212 ImageEntity* ie = new ImageEntity(); 203 213 ie->setTexture(se->getMenuItemImage()); 204 ie->setRelCoor(0.0f,20.0f - (this->menuLayer[1]->menuList.size() * 10.0f), 0.0f);205 214 ie->setVisibility(false); 215 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); 206 217 this->menuLayer[1]->menuList.push_back(ie); 207 218 208 219 // generating screenshoot item 209 // ie = new ImageEntity(); 210 // ie->setTexture(se->getMenuScreenshoot); 211 // ie->setRelCoor(.0f, 10.0f, 0.0f); 212 // this->menuLayer[1]->screenshootList.push_back(ie); 213 220 ie = new ImageEntity(); 221 ie->setTexture(se->getMenuScreenshoot()); 222 //ie->setRelCoor(10.0f, 10.0f, 0.0f); 223 ie->setVisibility(false); 224 ie->setBindNode((const PNode*)NULL); 225 ie->setRelCoor2D(State::getResX() / 2.0f + 200.0f, State::getResY() / 2.0f, 0.0f); 226 this->menuLayer[1]->screenshootList.push_back(ie); 214 227 } 215 228 } … … 345 358 { 346 359 this->menuSelected = this->menuLayer[this->layerIndex]->menuList[++this->menuSelectedIndex]; 347 this->menuSelector->setAbsCoor (this->menuSelected->getAbsCoor());360 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 348 361 } 349 362 } … … 353 366 { 354 367 this->menuSelected = this->menuLayer[this->layerIndex]->menuList[--this->menuSelectedIndex]; 355 this->menuSelector->setAbsCoor (this->menuSelected->getAbsCoor());368 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 356 369 } 357 370 } … … 374 387 std::vector<ImageEntity*>::iterator it; 375 388 // fade old menu 376 for( it = this->menuLayer[layer1]->menuList.begin(); it != this->menuLayer[layer1]->menuList.end(); it++ ) 389 for( it = this->menuLayer[layer1]->menuList.begin(); it != this->menuLayer[layer1]->menuList.end(); it++) 390 { 391 (*it)->setVisibility(false); 392 } 393 //also fade the screenshots if in level choosement mode 394 for( it = this->menuLayer[layer1]->screenshootList.begin(); it != this->menuLayer[layer1]->screenshootList.end(); it++) 377 395 { 378 396 (*it)->setVisibility(false); … … 386 404 (*it)->setVisibility(true); 387 405 } 406 //also fade the screenshots if in level choosement mode 407 for( it = this->menuLayer[layer1]->screenshootList.begin(); it != this->menuLayer[layer1]->screenshootList.end(); it++) 408 { 409 (*it)->setVisibility(true); 410 } 411 388 412 389 413 this->layerIndex = layer2; 390 414 this->menuSelected = this->menuLayer[layer2]->menuList[0]; 391 this->menuSelector->setAbsCoor (this->menuSelected->getAbsCoor());415 this->menuSelector->setAbsCoor2D(this->menuSelected->getAbsCoor2D()); 392 416 this->menuSelectedIndex = 0; 393 417 } -
trunk/src/story_entities/story_entity.cc
r6853 r6878 42 42 this->description = NULL; 43 43 this->menuItemImage = NULL; 44 this->menuScreenshoot = NULL; 44 45 this->nextStoryID = WORLD_ID_GAMEEND; 45 46 this->bMenuEntry = false; … … 77 78 .describe("If this entry is 1, the world is contained in the SimpleGameMenu"); 78 79 79 LoadParam(root, " menu-screenshoot", this, StoryEntity, setMenuScreenshoot)80 LoadParam(root, "screenshoot", this, StoryEntity, setMenuScreenshoot) 80 81 .describe("If this entry is 1, the world is contained in the SimpleGameMenu"); 81 82
Note: See TracChangeset
for help on using the changeset viewer.