dialogic icon indicating copy to clipboard operation
dialogic copied to clipboard

Event TextInput: Allow removing all bbcode from result

Open aumusic opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. I'm not sure that this is a 'problem', per se (hence why I'm listing it as a feature request), but I've noticed that it is possible to type BBCode parameters within text input boxes. For example, in some code testing I've been doing, I created a text box which prompts the user to enter their given name (which is then referenced in-text), and by typing in a BBCode parameter like, say, color=x, any iteration of the name is then colored in-text (including iterations which already have color parameters assigned to them, which are then overwritten by the BBCode typed into the initial text box).

Describe the solution you'd like Since I see how being able to type BBCode into a text input box might be useful, it would perhaps be nice to be able to toggle this ability on and off, or better yet, allow the designer the ability to limit which characters can be allowed within a text input box (being able to limit the number of characters would also be a nice feature).

Describe alternatives you've considered For the BBCode aspect, I know there is scripting which should automatically re-map either of the brackets used in BBCode so that the generated output doesn't contain usable BBCode, but I'm still new to all of this, so I don't yet know how to actually implement the code (though I will include the scripting I found online; apologies to whomever originally wrote it, as I don't remember the source):

extends RichTextLabel func escape_bbcode(bbcode_text): return bbcode_text.replace("[", "[lb]")

For reference, I'm currently using Dialogic 2.0-Alpha-09 in Godot 4.1.1.

Thank you

aumusic avatar Sep 18 '23 03:09 aumusic

I was confused initially. You mean the text input box in this case, right? I think that should be doable. Users typing bbcode into the text input didn't occur to me, but we might as well insert a guard.

Jowan-Spooner avatar Sep 18 '23 04:09 Jowan-Spooner

Yes, sorry, I'm referring to the text input box (under 'logic'). Thanks for your response on this. Do you have any thoughts on the further possibilities of limiting the types/amount of characters one can type into a text input box (it seems, at this time, the former can be addressed in Godot's project settings/input map, but I need to learn a bit more to see how to implement this one my end)?

Thanks again

aumusic avatar Sep 18 '23 05:09 aumusic