From c6e96463525c5c5bd6f61b4b50fe0df3530b8f8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Tue, 26 Jul 2011 17:04:03 +0300 Subject: [PATCH] Centered the texts in victory screen --- seascene.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/seascene.cpp b/seascene.cpp index 4d426b8..65c2ad7 100644 --- a/seascene.cpp +++ b/seascene.cpp @@ -655,17 +655,23 @@ void SeaScene::createVictoryItems() pVictoryCongratulationsItem_->setZValue(1000); addItem(pVictoryCongratulationsItem_); -// QGraphicsPixmapItem * pImageItem = new QGraphicsPixmapItem(QPixmap(":/pix/aavesaari.png"),pVictoryCongratulationsItem_); -// pImageItem->setPos(-100,150); -// pImageItem->setZValue(1000); -// pImageItem->setScale(2.0); + //coordinates are relative to the parent QGraphicsTextItem * pTextItem = new QGraphicsTextItem(pVictoryCongratulationsItem_); - pTextItem->setHtml("
Congratulations!
You have saved all the ghosts." - "

Tap to play again "); + pTextItem->setHtml(" Congratulations!"); pTextItem->setPos(-50,100); pTextItem->setZValue(1000); + + QGraphicsTextItem * pMiddleTextItem = new QGraphicsTextItem(pVictoryCongratulationsItem_); + pMiddleTextItem->setHtml(" You have saved all the ghosts."); + pMiddleTextItem->setPos(-145,140); + pMiddleTextItem->setZValue(1000); + + QGraphicsTextItem * pLowestTextItem = new QGraphicsTextItem(pVictoryCongratulationsItem_); + pLowestTextItem->setHtml(" Tap to play again"); + pLowestTextItem->setPos(-50,220); + pLowestTextItem->setZValue(1000); } void SeaScene::createAboutBoxItems() -- 1.7.9.5