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

Add UI event system #1415

Open
RiscadoA opened this issue Dec 16, 2024 · 0 comments
Open

Add UI event system #1415

RiscadoA opened this issue Dec 16, 2024 · 0 comments
Labels
A-Engine B-UI C-Tracking-Issue D-Chaotic We are not sure what this entails P-Urgent This issue is a big priority, and it would be good to close it ASAP S-Needs-Design Demands some time designing an implementation

Comments

@RiscadoA
Copy link
Member

RiscadoA commented Dec 16, 2024

Checklist

TODO, pls subdivide this into smaller issues if you pick this up

Problem

Currently, we have no event support in the UI plugin whatsoever, which is terrible for a UI system!
It is extremely important to get this done, because as is, it is impossible to use the UI for anything other than showing things.
Buttons etc, have to be implemented manually, by checking if the mouse position is within bounds.

Design

We should think very carefully about how this would be implemented.
We need at least the following features:

  • mouse click detection
  • mouse hover (enter & leave) detection

Events should also bubble up if they are not handled. I.e., if the text of a box inside a button is clicked, and the box doesn't handle the event, it should be passed to the button itself. It is unclear how we would do this in ECS.

It would be cool to also be able to control UI with gamepad input.
If you're picking this up, make sure to investigate how other UI event systems are designed!

@RiscadoA RiscadoA changed the title Add UI Pressed and Hovered components Add UI event system Dec 16, 2024
@RiscadoA RiscadoA added A-Engine B-UI P-Urgent This issue is a big priority, and it would be good to close it ASAP P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon S-Needs-Design Demands some time designing an implementation C-Tracking-Issue D-Chaotic We are not sure what this entails and removed P-Urgent This issue is a big priority, and it would be good to close it ASAP P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Engine B-UI C-Tracking-Issue D-Chaotic We are not sure what this entails P-Urgent This issue is a big priority, and it would be good to close it ASAP S-Needs-Design Demands some time designing an implementation
Projects
None yet
Development

No branches or pull requests

1 participant