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

Choices: Add override for custom choice buttons #2554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HuntJSparra
Copy link
Contributor

@HuntJSparra HuntJSparra commented Mar 14, 2025

The choice buttons for the Centered Choices and Textbubble Layer layers can be replaced with a PackedScene descending from DialogicNode_ChoiceButton. This is intended for users who want custom behavior for their buttons (the choice must be pressed 3 times, on-hover animations, multi-Control UI, etc.).

New Settings:
Centered Choices: Text/Behavior/Custom Button
Textbubble Layer: Choices/Behavior/Custom Button

Changes to DialogicNode_ChoiceButton:
The on-pressed behavior of the button can be customized by overriding _on_pressed(). By default, this preserves the existing behavior by emitting the new choice_selected signal when the button is pressed. The Choices Subsystem has now listens for the button's choice_selected signal instead of pressed.

Changes to VN/Centered Choice Layer:
The centered choice layer now instantiates its buttons when the style is changed (functionally similar to Textbubble Layer) so that custom buttons are applied, including while the timeline is running.

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

Successfully merging this pull request may close these issues.

1 participant