[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeedu/khangman/khangman
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2005-04-08 3:05:34
Message-ID: 20050408030534.639A063E () office ! kde ! org
[Download RAW message or body]
CVS commit by annma:
fixed position of already guessed letter
M +10 -4 khangmanview.cpp 1.95
--- kdeedu/khangman/khangman/khangmanview.cpp #1.94:1.95
@@ -150,5 +150,4 @@ bool KHangManView::containsChar(const QS
bool b = false;
if (m_accent && !accent_b) {
- kdDebug() << "Testing " << endl;
if (sChar=="i") b = word.contains(QString("Ã"))>0;//QChar('Ã').unicode()) \
> 0;
if (sChar=="a") b = word.contains(QString("Ã ")) > 0 || \
word.contains(QString("á")) > 0 || word.contains(QString("ã")) > 0; @@ -249,6 \
+248,14 @@ void KHangManView::paintMissedTwice() if (redIndex == 0)
paint.drawText( width()/2+width()/4 +aux.width()+1, height()/13, \
QString(missedL[redIndex]));
- else
+ else if (redIndex <=8)
paint.drawText( width()/2+width()/4 +aux.width()-4, 0, 0, 0, \
AlignLeft|AlignTop|DontClip,QString(missedL[redIndex])); + else if (redIndex ==12) \
{ + aux = paint.boundingRect(QRect(), AlignLeft|AlignTop|DontClip, \
missedL.mid(12, redIndex-12));//left(redIndex-12)); + paint.drawText( \
width()/2+width()/4 +aux.width(), height()/13+12, 0, 0, \
AlignLeft|AlignTop|DontClip,QString(missedL[redIndex])); + }
+ else if (redIndex > 12) {
+ aux = paint.boundingRect(QRect(), AlignLeft|AlignTop|DontClip, \
missedL.mid(12, redIndex-12));//left(redIndex-12)); + paint.drawText( \
width()/2+width()/4 +aux.width() -4, height()/13+12, 0, 0, \
AlignLeft|AlignTop|DontClip,QString(missedL[redIndex])); + }
paint.end();
bitBlt(this, 0, 0, paletteBackgroundPixmap());
@@ -336,5 +343,4 @@ void KHangManView::slotTry()
missedChar++;
- kdDebug() << missedChar << endl;
paintHangman();
@@ -367,5 +373,5 @@ void KHangManView::slotTry()
{
//usability: highlight it in Missed if it is there
- if (missedL.contains(sChar)>0) { //popup should be better placed
+ if (missedL.contains(sChar)>0) { //TODO popup should be better placed
KPassivePopup *popup = new KPassivePopup( this, "popup" );
popup->setAutoDelete( true );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic