Skip to content

Provide an ability to define custom bound checking for UI element interaction #5180

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

Open
FylmTM opened this issue Jul 3, 2022 · 1 comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible

Comments

@FylmTM
Copy link

FylmTM commented Jul 3, 2022

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

Sometimes UI elements might not be rectangular, for example - hexagonal. In such case it would be beneficial if there would be a possibility to have a custom bound checking function to be defined, so that such UI elements could work within the scope of general ui_focus_system.

This also includes handling events like hover on UI elements with different styling like rotation.

What solution would you like?

Perhaps, we could provide a component that would contain bound-checking function. This would work for cases where bound checking does not require external information and could be calculated based on transform and/or position.

No idea how it could be implemented for more generic/complicated bound checking functions that rely on some game state.

What alternative(s) have you considered?

Another solution would be marking "special" UI elements to be exempt from being handled by internal ui_focus_system.
And instead delegate responsibility for doing interactivity in such cases to developers.

Howevers, this approach makes it questionable on how to handle focus policy accross UI.

Additional context

#5179 - is likely connected issue with this one (they originated from the same conversation).

@FylmTM FylmTM added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jul 3, 2022
@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels Jul 3, 2022
@alice-i-cecile
Copy link
Member

Related to #4210 :)

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-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

2 participants