mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 20:15:34 +00:00
allow multiple cell coordinates in c-type hint for scene subviews
This commit is contained in:
parent
0d352cb883
commit
e0550ba336
1 changed files with 13 additions and 6 deletions
|
@ -15,19 +15,26 @@ void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
|
||||||
|
|
||||||
if (hint[0]=='c')
|
if (hint[0]=='c')
|
||||||
{
|
{
|
||||||
char ignore1, ignore2, ignore3;
|
// syntax: c:#x1 y1; #x2 y2 (number of coordinate pairs can be 0 or larger)
|
||||||
int x, y;
|
char ignore;
|
||||||
|
|
||||||
std::istringstream stream (hint.c_str());
|
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 adjust camera position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (hint[0]=='r')
|
||||||
/// \todo implement 'r' type hints
|
{
|
||||||
|
/// \todo implement 'r' type hints
|
||||||
|
}
|
||||||
|
|
||||||
setCellSelection (selection);
|
setCellSelection (selection);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue