mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Issue/453 (#556)
* Introduced guiName to PropertyOwner * Added requirement that PropertyOwner::identifier may not contain whitespaces * Changed Name to Identifier in asset and scene files * Added new PropertyOwner to RenderEngine that owns the ScreenSpaceRenderables * Moved Name and GuiPath into GUI group * Added user-facing names to layer groups
This commit is contained in:
@@ -84,20 +84,25 @@ ScreenSpaceImageLocal::ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary
|
||||
"ScreenSpaceImageLocal"
|
||||
);
|
||||
|
||||
if (dictionary.hasKey(KeyName)) {
|
||||
setName(dictionary.value<std::string>(KeyName));
|
||||
}
|
||||
else {
|
||||
int iIdentifier = 0;
|
||||
if (_identifier.empty()) {
|
||||
static int id = 0;
|
||||
if (id == 0) {
|
||||
setName("ScreenSpaceImageLocal");
|
||||
iIdentifier = id;
|
||||
|
||||
if (iIdentifier == 0) {
|
||||
setIdentifier("ScreenSpaceImageLocal");
|
||||
}
|
||||
else {
|
||||
setName("ScreenSpaceImageLocal " + std::to_string(id));
|
||||
setIdentifier("ScreenSpaceImageLocal" + std::to_string(iIdentifier));
|
||||
}
|
||||
++id;
|
||||
}
|
||||
|
||||
if (_guiName.empty()) {
|
||||
// Adding an extra space to the user-facing name as it looks nicer
|
||||
setGuiName("ScreenSpaceImageLocal " + std::to_string(iIdentifier));
|
||||
}
|
||||
|
||||
_texturePath.onChange([this]() { _textureIsDirty = true; });
|
||||
addProperty(_texturePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user