mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +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')
|
||||
{
|
||||
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…
Reference in a new issue