I'm ussing BBCode RichTextEffects to hide text. The text only turns invisable but doesn't behave as it would in 3.5 or as the 4.10 documentation states it should.
@tool
extends RichTextEffect
class_name HideText
var bbcode := "hide"
func _process_custom_fx( char_fx : CharFXTransform) -> bool :
if Settings.hide == true :
char_fx.set_visibility( false )
return true
Unparsed text:
"Integer vitae justo eget magna fermentum iaculis eu non diam.[no_hide]
This should show. [/no_hide][hide]
This should be hidden..[/hide]
Convallis a cras semper auctor neque vitae tempus quam. Integer vitae justo eget magna fermentum iaculis eu non diam."
output looks like this :
"Integer vitae justo eget magna fermentum iaculis eu non diam.
This should show.
invisible, selectable, space-consuming characters be here!!!!!
Convallis a cras semper auctor neque vitae tempus quam. Integer vitae justo eget magna fermentum iaculis eu non diam."
The [hide] tag "works", in that it hides the text. The issue is that you can still select, copy and paste this "hidden" text and it still takes up space. The documentation says that the text should move to take up this space and that if I didn't want this, I should set the Alpha to 0 instead. But it seems like setting the Alpha to 0 is exactly what this char_fx is actually doing, rather than hiding the text and shifting the visible characters as the documentation implies.
I switched to 4.10 because 3.5 would hide the text but the control would still size itself as if the text was still there. I just can't seem win... sigh.