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

Choice event enhancements #2304

Merged

Conversation

Jowan-Spooner
Copy link
Collaborator

@Jowan-Spooner Jowan-Spooner commented Jun 23, 2024

This changes the syntax of the choice event a bit:

- Choice Text | [if Condition] [shortcode="value"]
- Choice Text | [shortcode="value"]
- Choice Text

The old syntax without | still works though.

This also adds a new extra_data field to choices. This data will be provided to choice buttons so they can now be uniquely identified and given arbitrary information. This would be even cooler, if the dictionary field would be nicer looking.

This also makes it so you have to press a button to enable the condition on choices, which looks much better.

This also fixes a bug with visual editor fields not having the correct value if they start hidden and are then revealed by a condition changing.

This dictionary is provided to the choice nodes as well and can be interpreted in any way.
This changes the shortcode regex to allow for unescaped " when the parameter value is a dictionary or array (starting and ending with {}/[]). Previously dictionaries looked absolutely terrible when used as a shortcode parameter.
@Jowan-Spooner Jowan-Spooner added Bug 🐞 Something isn't working Enhance ⚡ Improve a feature's workflow. Feature✨ labels Jun 23, 2024
@Jowan-Spooner Jowan-Spooner merged commit 8218dd1 into dialogic-godot:main Jun 24, 2024
2 checks passed
@Jowan-Spooner Jowan-Spooner deleted the choice-event-enhancement branch July 8, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working Enhance ⚡ Improve a feature's workflow. Feature✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the color of choice button based on the choice
1 participant