Add a method for creating a unique name for screenspace renderable (closes #652)

This commit is contained in:
Alexander Bock
2019-12-27 21:25:22 +01:00
parent ce7795a67b
commit a51cee1f36
8 changed files with 63 additions and 75 deletions

View File

@@ -101,17 +101,17 @@ RenderablePlaneSpout::RenderablePlaneSpout(const ghoul::Dictionary& dictionary)
iIdentifier = id;
if (iIdentifier == 0) {
setIdentifier("ScreenSpaceSpout");
setIdentifier("RenderablePlaneSpout");
}
else {
setIdentifier("ScreenSpaceSpout" + std::to_string(iIdentifier));
setIdentifier("RenderablePlaneSpout" + std::to_string(iIdentifier));
}
++id;
}
if (_guiName.empty()) {
// Adding an extra space to the user-facing name as it looks nicer
setGuiName("ScreenSpaceSpout " + std::to_string(iIdentifier));
setGuiName("RenderablePlaneSpout " + std::to_string(iIdentifier));
}
if (dictionary.hasKey(NameInfo.identifier)) {