Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new signal for when the TextBubble visibility changes #665

Closed
idontkillcoyotes opened this issue Dec 4, 2021 · 7 comments
Closed

Add new signal for when the TextBubble visibility changes #665

idontkillcoyotes opened this issue Dec 4, 2021 · 7 comments

Comments

@idontkillcoyotes
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Not really a problem, but it would be nice to have.

Describe the solution you'd like
Have the DialogNode emit a signal when the TextBubble node hides or shows.
This signal could be used to implement a pause system in a game, so whenever the TextBubble is visible pause the rest of the game.

@coppolaemilio coppolaemilio added this to the Version 1.4 milestone Dec 4, 2021
@Jowan-Spooner
Copy link
Collaborator

Hi @idontkillcoyotes thanks for the suggestion.
For the use-case you mentioned, you wouldn't want to know wether the TextBubble is visible tho, you would want to know when a dialog is in progress. Or am I misunderstanding this? There are some cases (for example during a wait event) where the text bubble is hidden although the dialog is still in progress.

Currently (in 1.3+) you can use Dialogic.has_current_dialog_node() (returns either true or false) to find out if there is currently a dialog in progress.

Feel free to clarify, if I misunderstood what you want.

@idontkillcoyotes
Copy link
Contributor Author

Hmm... for my use-case I think it doesn't matter if a dialog is in progress, only the text bubble visibility.

I think one way of describing what I meant is to treat the text bubble as one of those popup windows that prevents you from interacting with the rest of the program until you close it, something like that

@Jowan-Spooner
Copy link
Collaborator

Jowan-Spooner commented Dec 17, 2021

how would a signal help with this? isn't it much easier to just use

# e.g.: you don't want the character to move if there is a dialog in progress
func move_character():
    if Dialogic.has_current_dialog_node():
        return

How would your code look if you'd use a signal, like you want?

@Jowan-Spooner
Copy link
Collaborator

@idontkillcoyotes, could you elaborate if you still think this would be a good idea or what other reasons there could be for this signal?

@idontkillcoyotes
Copy link
Contributor Author

idontkillcoyotes commented Jan 13, 2022

Sorry, I've been busy and forgot about this thread..

About the change, I already implemented it for my game.
I am using it for a UI based minigame, in which the minigame "pauses" when there is text from the dialog to show. Because the way I'm using the plugin, there is always a dialog in progress for every scene of my game (in this case the dialog, or timeline, is waiting for the player to finish the minigame to continue).
So I need to differentiate whether the text bubble is visible or not

Saying that, I think my case is still not a "normal" use case, so I don't really know if would be a good idea to implement it

@Jowan-Spooner
Copy link
Collaborator

I see. Makes sense to me, so I will see how it can best be done and probably gonna add it. It won't hurt and we can always decide to remove it again for 2.0.

@Jowan-Spooner
Copy link
Collaborator

There is now such a signal in 2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants