Fixed localization issues when using the content registry

This commit is contained in:
WerWolv
2021-02-13 15:15:32 +01:00
parent 36a4930b35
commit 424bba71f7
20 changed files with 268 additions and 241 deletions

View File

@@ -16,7 +16,7 @@ namespace hex::dp {
In, Out
};
Attribute(IOType ioType, Type type, std::string_view name) : m_id(SharedData::dataProcessorNodeIdCounter++), m_ioType(ioType), m_type(type), m_name(name) {
Attribute(IOType ioType, Type type, std::string_view unlocalizedName) : m_id(SharedData::dataProcessorNodeIdCounter++), m_ioType(ioType), m_type(type), m_unlocalizedName(unlocalizedName) {
}
@@ -28,7 +28,7 @@ namespace hex::dp {
[[nodiscard]] u32 getID() const { return this->m_id; }
[[nodiscard]] IOType getIOType() const { return this->m_ioType; }
[[nodiscard]] Type getType() const { return this->m_type; }
[[nodiscard]] std::string_view getName() const { return this->m_name; }
[[nodiscard]] std::string_view getUnlocalizedName() const { return this->m_unlocalizedName; }
void addConnectedAttribute(u32 linkId, Attribute *to) { this->m_connectedAttributes.insert({ linkId, to }); }
void removeConnectedAttribute(u32 linkId) { this->m_connectedAttributes.erase(linkId); }
@@ -41,7 +41,7 @@ namespace hex::dp {
u32 m_id;
IOType m_ioType;
Type m_type;
std::string m_name;
std::string m_unlocalizedName;
std::map<u32, Attribute*> m_connectedAttributes;
Node *m_parentNode;