Script Canvas, replace the text replacement system to a JSON file based one (#5228)
It is now possible to right click on nodes on the node palette to navigate to the file that holds the text data for any given node, this way it is easy to update and improve the naming of titles, subtitles, categories, tool tips and slots.
This commit is contained in:
+7
-14
@@ -58,13 +58,8 @@ namespace GraphCanvas
|
||||
{
|
||||
m_connectionType = slotRequests->GetConnectionType();
|
||||
|
||||
TranslationKeyedString slotName = slotRequests->GetTranslationKeyedName();
|
||||
|
||||
m_slotText->SetLabel(slotName);
|
||||
|
||||
TranslationKeyedString toolTip = slotRequests->GetTranslationKeyedTooltip();
|
||||
|
||||
OnTooltipChanged(toolTip);
|
||||
m_slotText->SetLabel(slotRequests->GetName());
|
||||
OnTooltipChanged(slotRequests->GetTooltip());
|
||||
|
||||
const SlotConfiguration& configuration = slotRequests->GetSlotConfiguration();
|
||||
|
||||
@@ -88,17 +83,15 @@ namespace GraphCanvas
|
||||
OnStyleChanged();
|
||||
}
|
||||
|
||||
void ExecutionSlotLayout::OnNameChanged(const TranslationKeyedString& name)
|
||||
void ExecutionSlotLayout::OnNameChanged(const AZStd::string& name)
|
||||
{
|
||||
m_slotText->SetLabel(name);
|
||||
}
|
||||
|
||||
void ExecutionSlotLayout::OnTooltipChanged(const TranslationKeyedString& tooltip)
|
||||
void ExecutionSlotLayout::OnTooltipChanged(const AZStd::string& tooltip)
|
||||
{
|
||||
AZStd::string displayText = tooltip.GetDisplayString();
|
||||
|
||||
m_slotConnectionPin->setToolTip(displayText.c_str());
|
||||
m_slotText->setToolTip(displayText.c_str());
|
||||
m_slotConnectionPin->setToolTip(tooltip.c_str());
|
||||
m_slotText->setToolTip(tooltip.c_str());
|
||||
}
|
||||
|
||||
void ExecutionSlotLayout::OnStyleChanged()
|
||||
@@ -132,7 +125,7 @@ namespace GraphCanvas
|
||||
if (!textDecoration.empty())
|
||||
{
|
||||
m_textDecoration = new GraphCanvasLabel();
|
||||
m_textDecoration->SetLabel(textDecoration, "", "");
|
||||
m_textDecoration->SetLabel(textDecoration);
|
||||
m_textDecoration->setToolTip(toolTip.c_str());
|
||||
|
||||
ApplyTextStyle(m_textDecoration);
|
||||
|
||||
Reference in New Issue
Block a user