mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
"full" question support. Now needs to be linked with the dialogue Manager.
This commit is contained in:
parent
debec44b51
commit
5cbd256e1c
1 changed files with 10 additions and 3 deletions
|
@ -51,11 +51,18 @@ void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
||||||
const IntPoint& lastPressed = InputManager::getInstance().getLastLeftPressed();
|
const IntPoint& lastPressed = InputManager::getInstance().getLastLeftPressed();
|
||||||
|
|
||||||
size_t cursorPosition = t->getCursorPosition(lastPressed);
|
size_t cursorPosition = t->getCursorPosition(lastPressed);
|
||||||
if(history->getColorAtPos(cursorPosition) != "#B29154")
|
MyGUI::UString color = history->getColorAtPos(cursorPosition);
|
||||||
|
if(color != "#B29154")
|
||||||
{
|
{
|
||||||
UString key = history->getColorTextAt(cursorPosition);
|
UString key = history->getColorTextAt(cursorPosition);
|
||||||
|
|
||||||
//std::cout << "Clicked on key: " << key << std::endl;
|
//std::cout << "Clicked on key: " << key << std::endl;
|
||||||
displayTopicText(key);
|
if(color == "#686EBA") displayTopicText(key);
|
||||||
|
if(color == "#572D21")
|
||||||
|
{
|
||||||
|
//TODO: send back the answere to the question!
|
||||||
|
std::cout << "and the ansere is..."<< key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +161,7 @@ void DialogueWindow::askQuestion(std::string question,std::list<std::string> ans
|
||||||
history->addDialogText(parseText(question));
|
history->addDialogText(parseText(question));
|
||||||
for(std::list<std::string>::iterator it = answers.begin();it!=answers.end();it++)
|
for(std::list<std::string>::iterator it = answers.begin();it!=answers.end();it++)
|
||||||
{
|
{
|
||||||
history->addDialogText("#572D21"+(*it)+"#B29154");
|
history->addDialogText("#572D21"+(*it)+"#B29154"+" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue