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

Expose ItemList's auto height value with get_auto_height_value #70034

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Spartan322
Copy link
Contributor

@Spartan322 Spartan322 commented Dec 13, 2022

Relies on #63634

Addresses godotengine/godot-proposals#254 with a more explicit call alongside #63634, as custom_minimum_size may hide the auto height value. This makes reliance on the auto height value more explicit for calculations, however since nothing yet forces the auto_height_value to update regardless of auto_height, technically #63634 (comment) still presents a bit of an issue, as the return value here will just be from the last time auto_height was true or otherwise it'll return 0, perhaps it would be justified to implement:

func update_auto_height(force : bool = false)

With such, an update_auto_height call could force the auto_height_value to update even if auto_height is false as it currently does not allow the user to do so. As it stands the usefulness of this PR is quite limited and only really good for being explicit and avoiding custom_minimum_size.

Exposed Additions

ItemList:

func get_auto_height_value() -> float

@Spartan322 Spartan322 requested review from a team as code owners December 13, 2022 23:12
@Chaosus Chaosus added this to the 4.x milestone Dec 14, 2022
@Spartan322 Spartan322 force-pushed the auto-height-expose branch 4 times, most recently from be5c24d to 5ff665b Compare December 14, 2022 16:12
Expose `update_auto_height` to allow updating the auto_height_value early
Expose `update_auto_height` to allow updating the auto_height_value early
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.

2 participants