allow multiple cell coordinates in c-type hint for scene subviews

actorid
Marc Zinnschlag 11 years ago
parent 0d352cb883
commit e0550ba336

@ -15,19 +15,26 @@ void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
if (hint[0]=='c')
{
char ignore1, ignore2, ignore3;
int x, y;
// syntax: c:#x1 y1; #x2 y2 (number of coordinate pairs can be 0 or larger)
char ignore;
std::istringstream stream (hint.c_str());
if (stream >> ignore1 >> ignore2 >> ignore3 >> x >> y)
if (stream >> ignore)
{
selection.add (CSMWorld::CellCoordinates (x, y));
char ignore1; // : or ;
char ignore2; // #
int x, y;
while (stream >> ignore1 >> ignore2 >> x >> y)
selection.add (CSMWorld::CellCoordinates (x, y));
/// \todo adjust camera position
}
}
/// \todo implement 'r' type hints
else if (hint[0]=='r')
{
/// \todo implement 'r' type hints
}
setCellSelection (selection);
}

Loading…
Cancel
Save