Changeset 3845 in orxonox.OLD for orxonox/trunk/src/track_manager.cc
- Timestamp:
- Apr 17, 2005, 1:19:54 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/track_manager.cc
r3842 r3845 23 23 #include "stdincl.h" 24 24 #include "list.h" 25 26 25 #include "text_engine.h" 26 #include "animation.h" 27 27 28 28 #include <stdarg.h> … … 386 386 this->maxTime = 0; 387 387 this->trackElemCount = 1; 388 388 389 this->trackNode = new TrackNode(); 389 390 this->setBindSlave(this->trackNode); 391 // initializing the Text 392 this->trackText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0); 393 this->trackText->setAlignment(TEXT_ALIGN_SCREEN_CENTER); 394 // initializing the Animation for the Text. 395 this->textAnimation = new tAnim<Text>(this->trackText, &Text::setBlending); 396 this->textAnimation->addKeyFrame(1.0, 1.0, ANIM_LINEAR); 397 this->textAnimation->addKeyFrame(0.0, 1.0); 398 this->textAnimation->setInfinity(ANIM_INF_CONSTANT); 390 399 } 391 400 … … 929 938 this->currentTrackElem = this->currentTrackElem->getChild(this->choosePath(this->currentTrackElem)); 930 939 this->currentTrackElem->history = tmpHistoryElem; 940 if (this->currentTrackElem->getName()) 941 { 942 this->trackText->setText(this->currentTrackElem->getName()); 943 this->textAnimation->play(); 944 } 931 945 } 932 946 if (this->bindSlave) … … 954 968 { 955 969 if (time == 0) 956 this->currentTrackElem = this->firstTrackElem; 970 { 971 this->currentTrackElem = this->firstTrackElem; 972 if (this->currentTrackElem->getName()) 973 { 974 this->trackText->setText(this->currentTrackElem->getName()); 975 this->textAnimation->play(); 976 } 977 } 957 978 this->localTime = time; 958 979 }
Note: See TracChangeset
for help on using the changeset viewer.