daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Sep 21st, 2015 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void Game::updateText()
  2. {
  3.     airspeedText->setPlainText(QString("Airspeed: ") + QString::number(airspeed));
  4.     airspeedText->setPos(plane->pos().x() -600, 2);
  5.  
  6.     planeAngleText->setPlainText(QString("Pitch: ") + QString::number(-planeAngle) + QString("ยบ"));
  7.     planeAngleText->setPos(plane->pos().x() -600, 18);
  8.  
  9.     RCtext->setPlainText((QString("Rate Of Climb: ") + QString::number(-RC)));
  10.     RCtext->setPos(plane->pos().x() -600, 34);
  11.  
  12.     altitudeText->setPlainText((QString("Altitude: ") + QString::number(screenHeight * 27.7 - altitude *27.7)));
  13.     altitudeText->setPos(plane->pos().x() - 600, 50);
  14.  
  15.     flapAngleText->setPlainText((QString("Flap Angle: ") + QString::number(flapAngle)));
  16.     flapAngleText->setPos(plane->pos().x() -600, 66);
  17.  
  18.     if(spoiler == 0){spoilerPosText->setPlainText("Spoilers: Unarmed");}
  19.     if(spoiler == 1){spoilerPosText->setPlainText("Spoilers: Flight");}
  20.     if(spoiler == 2){spoilerPosText->setPlainText("Spoilers: Armed");}
  21.     spoilerPosText->setPos(plane->pos().x() -600, 82);
  22.  
  23.     if(brakes == 0){brakesText->setPlainText("Brakes: Off");}
  24.     if(brakes == 1){brakesText->setPlainText("Brakes: On");}
  25.     brakesText->setPos(plane->pos().x() -600, 98);
  26.  
  27.     if(crash == true){
  28.         youLostText->setPlainText("You crashed the airplane");
  29.         youLostText->setPos(plane->pos().x() -400, 340);
  30.         scene->addItem(youLostText);
  31.         updateTextTimer->stop();
  32.  
  33.         replay = new QPushButton("Replay", this);
  34.         replay->setGeometry(QRect(QPoint(4500, 400), QSize(100,50)));
  35.     }
  36.  
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top