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

Consider special treatment for some types of variables in replace_variables() #270

Open
Jeremi360 opened this issue May 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jeremi360
Copy link
Contributor

I think thatreplace_variables() in some cases should do more that just str(value_of_var).
For example now it makes using Color values need in text needs a workaround.
As str(some_color) returns (0-1, 0-1, 0-1, 0-1) and should #hex_color to be useful.

Like mentioned in Note at Advanced Text Docs:

Current way RDS uses very raw way of converting RakuVars values to strings.
Because of this to use color in text like in example below there is need to use workaround:
GDScript Rakugo.set_variable("test_color", "#" + Color(1, 0.5, 1))

We just need to add special case for Color type and maybe other.

@Jeremi360 Jeremi360 added the enhancement New feature or request label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants