Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2017, 9:25:39 AM (6 years ago)
Author:
kuchlert
Message:

erste version bei der listenauswahl funktioniert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialog_HS17/src/modules/dialog/DialogManager.cc

    r11612 r11642  
    1616        void DialogManager::setDialog(Dialog* dialog)
    1717        {
    18                 this->currentTalk_ = dialog;   
     18                this->currentTalk_ = dialog;
     19                answerIds_ = currentTalk_->getAnswerIds();     
    1920        }
    2021
     
    2627    }
    2728
    28     /*
    29     std::vector<std::string> DialogManager::getAnswers()
     29    int DialogManager::getSize()
     30    {   
     31        return 2; //return this->answerIds_->size();
     32    }
     33
     34    std::string DialogManager::getAnswer(int index)
    3035    {
    31         // lua hat komisch arrays (eigentlich tables), wie implementiert man answers so das man nacher den key der gegeben antwort a
    32         // hat um ihn fuer update zu benutzen?
     36        return this->currentTalk_->getAnswerString(this->answerIds_->at(index));
    3337    }
    34         */
     38       
     39    std::string DialogManager::getPerson()
     40    {
     41        return this->currentTalk_->getName();
     42    }
     43
     44    bool DialogManager::endtest()
     45    {
     46        return this->currentTalk_->ending();
     47    }
     48
     49    void DialogManager::update(int index)
     50    {
     51        this->currentTalk_->update(answerIds_->at(index));
     52        answerIds_ = this->currentTalk_->getAnswerIds();
     53    }
    3554}
Note: See TracChangeset for help on using the changeset viewer.