dialogic-godot / dialogic

💬 Create Dialogs, Visual Novels, RPGs, and manage Characters with Godot to create your Game!
https://dialogic.pro
MIT License
3.35k stars 206 forks source link

Make Dialogic.Text.speaker_updated signal update for text boxes without a speaker as well #2162

Closed Proggle closed 1 month ago

Proggle commented 1 month ago

I'm setting up my text box based on the Textbox With Speaker Portrait default, but I'm adding a tweak to avoid having as much wasted space when the speaker doesn't have a portrait.

If the speaker has a name and a portrait, they show up as normal image

If the speaker doesn't have a portrait, the text fills the entire box (instead of having an empty portrait area taking up space), and the name is at the top. image

If the speaker is "(no one)" is given, no name is shown at all, and no space is used at the top or the left image

The problem is, while the Dialogic.Text.speaker_updated signal seems ideal for this use case, it doesn't fire off a signal when the speaker is set to (no one). I can work around this, but it seemed like the system would be more consistent if it sent a null instead of failing to emit.

CakeVR commented 1 month ago

Hello, please try to update to the latest Dialogic main branch!

Jowan-Spooner commented 1 month ago

I can confirm that this works on the main branch, so I will close this. I will leave a note here though, that if the first event has no speaker, the signal will not be emitted. This is expected, because it only informs us when the speaker CHANGES, while "no speaker" (aka ) is considered the default!