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

Use callable for TreeItem custom draw #87417

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Jan 20, 2024

Old behavior is deprecated

@AThousandShips
Copy link
Member Author

Could also add get_custom_draw_object and get_custom_draw_callback to fetch the callback from the method, but starting out like this

@KoBeWi
Copy link
Member

KoBeWi commented Jan 20, 2024

tbh custom draw should be a Callable, but it's too late to change it now I guess.

@AThousandShips
Copy link
Member Author

Agreed, we can add a new method for it and deprecate this one, it would still work fine with the new feature as it can still use the old method, but I think adding this won't hurt and does allow for easier clearing up

@AThousandShips AThousandShips marked this pull request as draft January 20, 2024 18:33
@AThousandShips
Copy link
Member Author

Gonna look at reworking this for a callable as well as allowing clearing

@AThousandShips AThousandShips changed the title Allow clearing the custom draw for TreeItem Use callable for TreeItem custom draw Jan 20, 2024
scene/gui/tree.cpp Outdated Show resolved Hide resolved
@AThousandShips AThousandShips force-pushed the tree_clear branch 2 times, most recently from d1f5991 to d51cf07 Compare January 22, 2024 19:55
Deprecating old functionality
@YuriSizov YuriSizov merged commit a32a2ea into godotengine:master Jan 24, 2024
16 checks passed
@AThousandShips AThousandShips deleted the tree_clear branch January 24, 2024 13:15
@YuriSizov
Copy link
Contributor

Thanks!

@AThousandShips
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants