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

Update the Val::evaluate function to support viewport coordinates #9535

Closed
ickshonpe opened this issue Aug 22, 2023 · 1 comment · Fixed by #9568
Closed

Update the Val::evaluate function to support viewport coordinates #9535

ickshonpe opened this issue Aug 22, 2023 · 1 comment · Fixed by #9568
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior

Comments

@ickshonpe
Copy link
Contributor

ickshonpe commented Aug 22, 2023

What problem does this solve or what need does it fill?

The evaluate method of Val needs to be updated to support Val's viewport variants.

What solution would you like?

Val evaluate and all of Val's _with_size functions that use evaluate will need a viewport size parameter.

Viewport coordinates are explained here.

The tests also need to be updated and expanded to cover the viewport variants.

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Aug 22, 2023
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Aug 22, 2023
@ickshonpe
Copy link
Contributor Author

Maybe evalualate should be renamed to eval as well

github-merge-queue bot pushed a commit that referenced this issue Aug 29, 2023
…upport (#9568)

# Objective

Rename `Val`'s `evaluate` method to `resolve`.

Implement `resolve` support for `Val`'s viewport variants.

fixes #9535

---

## Changelog

`bevy_ui::ui_node::Val`:
* Renamed the following methods and added a `viewport_size` parameter:
   - `evaluate` to `resolve`
   - `try_add_with_size` to `try_add_with_context`
   - `try_add_assign_with_size` to `try_add_assign_with_context`
   - `try_sub_with_size` to `try_sub_with_context`
   - `try_sub_assign_with_size` to `try_sub_assign_with_context`
* Implemented `resolve` support for `Val`'s viewport coordinate types

## Migration Guide
* Renamed the following `Val` methods and added a `viewport_size`
parameter:
   - `evaluate` to `resolve`
   - `try_add_with_size` to `try_add_with_context`
   - `try_add_assign_with_size` to `try_add_assign_with_context`
   - `try_sub_with_size` to `try_sub_with_context`
   - `try_sub_assign_with_size` to `try_sub_assign_with_context`
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this issue Jan 9, 2024
…upport (bevyengine#9568)

# Objective

Rename `Val`'s `evaluate` method to `resolve`.

Implement `resolve` support for `Val`'s viewport variants.

fixes bevyengine#9535

---

## Changelog

`bevy_ui::ui_node::Val`:
* Renamed the following methods and added a `viewport_size` parameter:
   - `evaluate` to `resolve`
   - `try_add_with_size` to `try_add_with_context`
   - `try_add_assign_with_size` to `try_add_assign_with_context`
   - `try_sub_with_size` to `try_sub_with_context`
   - `try_sub_assign_with_size` to `try_sub_assign_with_context`
* Implemented `resolve` support for `Val`'s viewport coordinate types

## Migration Guide
* Renamed the following `Val` methods and added a `viewport_size`
parameter:
   - `evaluate` to `resolve`
   - `try_add_with_size` to `try_add_with_context`
   - `try_add_assign_with_size` to `try_add_assign_with_context`
   - `try_sub_with_size` to `try_sub_with_context`
   - `try_sub_assign_with_size` to `try_sub_assign_with_context`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants