Commit 937fc7fa authored by Andrius Štikonas's avatar Andrius Štikonas

Report correct chip colour in the popup.

parent 7e139f34
......@@ -239,8 +239,6 @@ HighscoresDialog::HighscoresDialog(int rank, QWidget *parent)
setFaceType( KPageDialog::Plain );
// TODO setButtonGuiItem( User1, KGuiItem(i18n("Configure..."), QLatin1String( "configure" )) );
// TODO setButtonGuiItem( User2, KGuiItem(i18n("Export...")) );
connect( this, SIGNAL(user1Clicked()), SLOT(slotUser1()) );
connect( this, SIGNAL(user2Clicked()), SLOT(slotUser2()) );
for (uint i=0; i<internal->nbGameTypes(); i++) {
QString title = internal->manager.gameTypeLabel(i, Manager::I18N);
......
......@@ -81,6 +81,7 @@ void KReversiView::setGame(KReversiGame *game)
void KReversiView::setChipsPrefix(ChipsPrefix chipsPrefix)
{
m_ColouredChips = chipsPrefix;
m_qml_root->setProperty("chipsImagePrefix",
Utils::chipPrefixToString(chipsPrefix));
}
......@@ -246,7 +247,8 @@ void KReversiView::whitePlayerCantMove()
{
// TODO: use Computer, You and Opponent instead in message
QMetaObject::invokeMethod(m_qml_root, "showPopup",
Q_ARG(QVariant,
Q_ARG(QVariant, m_ColouredChips ?
i18n("Red can not perform any move. It is blue turn again.") :
i18n("White can not perform any move. It is black turn again.")));
updateBoard();
}
......@@ -255,7 +257,8 @@ void KReversiView::blackPlayerCantMove()
{
// TODO: use Computer, You and Opponent instead in message
QMetaObject::invokeMethod(m_qml_root, "showPopup",
Q_ARG(QVariant,
Q_ARG(QVariant, m_ColouredChips ?
i18n("Blue can not perform any move. It is red turn again.") :
i18n("Black can not perform any move. It is white turn again.")));
updateBoard();
}
......@@ -159,7 +159,7 @@ private:
/**
* The SVG element prefix for the current chip set
*/
QString m_chipsPrefix;
ChipsPrefix m_ColouredChips;
/**
* If true, then last made turn will be shown to the player
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment