예제 #1
0
// End of round - Called when the round is over (when game timer runs out)
void Game::endOfRound()
{
    // Show end of round info
    char round[8];
    char score[16];
    snprintf(round, 32, "%d", currentRound);
    snprintf(score, 32, "%d", currentRoundScore);
    std::string title = "Round ";
    title += round;
    std::string msg = "Score: ";
    msg += score;
    if (currentRoundScore >= targetRoundScore)
    {
        title += " Complete";
        showInfoPanel(title.c_str(), msg.c_str());
        g_pAudio->PlaySound("audio/round_won.wav");
        // Move to next round number
        currentRound++;
    }
    else
    {
        title += " Failed";
        showInfoPanel(title.c_str(), msg.c_str());
        g_pAudio->PlaySound("audio/round_lost.wav");
    }

    // Change to round over game state
    changeGameState(roundOver);
}
예제 #2
0
EffectsListView::EffectsListView(QWidget *parent) :
        QWidget(parent)
{
    m_ui.setupUi(this);

    QMenu *menu = new QMenu(this);
    m_effectsList = new EffectsListWidget(menu);
    QVBoxLayout *lyr = new QVBoxLayout(m_ui.effectlistframe);
    lyr->addWidget(m_effectsList);
    lyr->setContentsMargins(0, 0, 0, 0);
    m_ui.search_effect->setListWidget(m_effectsList);
    m_ui.buttonInfo->setIcon(KIcon("help-about"));

    if (KdenliveSettings::showeffectinfo()) {
        m_ui.buttonInfo->setDown(true);
    } else m_ui.infopanel->hide();
    menu->addAction(KIcon("edit-delete"), i18n("Delete effect"), this, SLOT(slotRemoveEffect()));

    connect(m_ui.type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(filterList(int)));
    connect(m_ui.buttonInfo, SIGNAL(clicked()), this, SLOT(showInfoPanel()));
    connect(m_effectsList, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateInfo()));
    connect(m_effectsList, SIGNAL(doubleClicked(QListWidgetItem *, const QPoint &)), this, SLOT(slotEffectSelected()));

    m_effectsList->setCurrentRow(0);
}