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:
@@ -91,14 +91,6 @@ namespace GraphCanvas
|
||||
|
||||
void SlotComponent::Activate()
|
||||
{
|
||||
SetTranslationKeyedName(m_slotConfiguration.m_name);
|
||||
|
||||
// Default tooltip.
|
||||
if (m_slotConfiguration.m_tooltip.empty())
|
||||
{
|
||||
SetTranslationKeyedTooltip(m_slotConfiguration.m_name);
|
||||
}
|
||||
|
||||
SlotRequestBus::Handler::BusConnect(GetEntityId());
|
||||
SceneMemberRequestBus::Handler::BusConnect(GetEntityId());
|
||||
}
|
||||
@@ -171,24 +163,6 @@ namespace GraphCanvas
|
||||
}
|
||||
|
||||
void SlotComponent::SetName(const AZStd::string& name)
|
||||
{
|
||||
if (name == m_slotConfiguration.m_name.GetDisplayString())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_slotConfiguration.m_name.SetFallback(name);
|
||||
|
||||
// Default tooltip.
|
||||
if (m_slotConfiguration.m_tooltip.empty())
|
||||
{
|
||||
m_slotConfiguration.m_tooltip = m_slotConfiguration.m_name;
|
||||
}
|
||||
|
||||
SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name);
|
||||
}
|
||||
|
||||
void SlotComponent::SetTranslationKeyedName(const TranslationKeyedString& name)
|
||||
{
|
||||
if (name == m_slotConfiguration.m_name)
|
||||
{
|
||||
@@ -206,25 +180,22 @@ namespace GraphCanvas
|
||||
SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name);
|
||||
}
|
||||
|
||||
void SlotComponent::SetTooltip(const AZStd::string& tooltip)
|
||||
void SlotComponent::SetDetails(const AZStd::string& name, const AZStd::string& tooltip)
|
||||
{
|
||||
if (tooltip == m_slotConfiguration.m_tooltip.GetDisplayString())
|
||||
if (name != m_slotConfiguration.m_name)
|
||||
{
|
||||
return;
|
||||
m_slotConfiguration.m_name = name;
|
||||
SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name);
|
||||
}
|
||||
|
||||
m_slotConfiguration.m_tooltip.SetFallback(tooltip);
|
||||
|
||||
// Default tooltip.
|
||||
if (m_slotConfiguration.m_tooltip.empty())
|
||||
if (tooltip != m_slotConfiguration.m_tooltip)
|
||||
{
|
||||
m_slotConfiguration.m_tooltip = m_slotConfiguration.m_name;
|
||||
m_slotConfiguration.m_tooltip = tooltip;
|
||||
SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnTooltipChanged, m_slotConfiguration.m_tooltip);
|
||||
}
|
||||
|
||||
SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnTooltipChanged, m_slotConfiguration.m_tooltip);
|
||||
}
|
||||
|
||||
void SlotComponent::SetTranslationKeyedTooltip(const TranslationKeyedString& tooltip)
|
||||
void SlotComponent::SetTooltip(const AZStd::string& tooltip)
|
||||
{
|
||||
if (tooltip == m_slotConfiguration.m_tooltip)
|
||||
{
|
||||
@@ -521,8 +492,8 @@ namespace GraphCanvas
|
||||
{
|
||||
slotConfiguration.m_connectionType = GetConnectionType();
|
||||
|
||||
slotConfiguration.m_name = GetTranslationKeyedName();
|
||||
slotConfiguration.m_tooltip = GetTranslationKeyedTooltip();
|
||||
slotConfiguration.m_name = m_slotConfiguration.m_name;
|
||||
slotConfiguration.m_tooltip = m_slotConfiguration.m_tooltip;
|
||||
|
||||
slotConfiguration.m_slotGroup = GetSlotGroup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user