So, I have two different widgets.
The first is a dialogue box. Its structure is like this:
I have functionality where, depending on the NPC you are talking to, a number of Text Blocks get created and parented to the GridPanel.
Those Text Blocks are all based on this Widget blueprint:
I’m trying add functionality so that when one of these Text Blocks is clicked, it changes the text in the DialogueText Text Block from the first blueprint.
I have an interface to send the exec from the second blueprint to the first upon click, but I cannot figure out how to get a ref to W_DialogueBox into W_DialogueTopic.
I can get the parent of the parent of the parent of W_DialogueTopic, which is the Canvas Panel in the first widget, but it won’t let me go one step further and get W_DialogueBox itself.
I thought maybe I could just do what I need to do directly in W_DialogueTopic’s blueprint, but in order to get the DialogueText Text Block variable, I still need a ref to the W_DialogueBox somehow, so either way it’s a dead end.
It might be helpful to know that W_DialogueBox is itself created in a third blueprint, an Actor Component that gets added to anything that can have a dialogue.
I suppose I could refactor this and put some of this logic directly into the W_DialogueBox blueprint, get a reference to self in there, pass that variable to Player Controller or something, then grab that within the W_DialogueTopic blueprint? It seems like a lot of work for this though, so I’m guessing there must be a simpler way to get these actors to talk to each other.