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

Code examples for set_item_custom_bg_color() is completely wrong #4712

Closed
goatchurchprime opened this issue Mar 3, 2021 · 0 comments
Closed
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug

Comments

@goatchurchprime
Copy link

Your Godot version:
3.2.3

Issue description:
The code examples for set_item_custom_bg_color() and set_item_custom_fg_color() are invalid.

They say:

var some_string = "Some text"
some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.

But set_item_custom_bg_color is not a member function of type String, it's a member function of type ItemList.

Also the brackets aren't matched.

Just delete these code examples entirely. The functions are simple enough to not need them.

URL to the documentation page:
https://docs.godotengine.org/en/stable/classes/class_itemlist.html#class-itemlist-method-set-item-custom-bg-color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug
Projects
None yet
Development

No branches or pull requests

2 participants