Exemple #1
0
  void _GUI::updateDebugWindow()
  {

    static std::list<int> pastState;

    IGame* currentGame = AnimationEngine->GetCurrentGame();

    if(currentGame != NULL)
    {
        int i = 0;

        list<int> temp = currentGame->getSelectedUnits();

        if(temp != pastState)
        {
            m_debugSelectionsList->clearContents();
            m_debugSelectionsList->setRowCount(currentGame->getSelectedUnits().size());

            for(auto& unit : temp)
            {
               m_debugSelectionsList->setItem(i++, 0, new QTableWidgetItem(QVariant(unit).toString() ));
            }

            pastState = temp;
        }

    }
  }