|
|
@ -4,6 +4,7 @@
|
|
|
|
#include <ColorText.h>
|
|
|
|
#include <ColorText.h>
|
|
|
|
#include <Console.h>
|
|
|
|
#include <Console.h>
|
|
|
|
#include <Export.h>
|
|
|
|
#include <Export.h>
|
|
|
|
|
|
|
|
#include <MiscUtils.h>
|
|
|
|
#include <PluginManager.h>
|
|
|
|
#include <PluginManager.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <modules/Gui.h>
|
|
|
|
#include <modules/Gui.h>
|
|
|
@ -11,6 +12,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <list>
|
|
|
|
#include <set>
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <utility>
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
@ -159,13 +161,18 @@ void viewscreen_commandpromptst::render()
|
|
|
|
parent->render();
|
|
|
|
parent->render();
|
|
|
|
if (is_response)
|
|
|
|
if (is_response)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto it = responses.begin();
|
|
|
|
int y = 0;
|
|
|
|
for (int i = 0; i < dim.y && it != responses.end(); i++, it++)
|
|
|
|
for (auto &response : responses)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Screen::fillRect(Screen::Pen(' ', 7, 0), 0, i, dim.x, i);
|
|
|
|
std::vector<std::string> lines;
|
|
|
|
std::string cur_line = it->second;
|
|
|
|
word_wrap(&lines, response.second, dim.x);
|
|
|
|
Screen::paintString(Screen::Pen(' ', it->first, 0), 0, i,
|
|
|
|
for (auto &line : lines)
|
|
|
|
cur_line.substr(0, cur_line.size() - 1));
|
|
|
|
{
|
|
|
|
|
|
|
|
Screen::fillRect(Screen::Pen(' ', 7, 0), 0, y, dim.x, y);
|
|
|
|
|
|
|
|
Screen::paintString(Screen::Pen(' ', response.first, 0), 0, y, line);
|
|
|
|
|
|
|
|
if (++y >= dim.y)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|