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

Runtime disabling of specific input type tracking #478

Closed
wants to merge 10 commits into from

Conversation

Shute052
Copy link
Collaborator

@Shute052 Shute052 commented Feb 20, 2024

Objective

Allow disabling of specific input type tracking.
This can be especially useful if users encounter conflicts with input handling from other crates not currently integrated yet.

Solution

Add TrackingState enum for always enabling, always disabling, or ignoring once for input type tracking.

Add a new resource called TrackingInputType, which includes flags for enabling specific input type tracking.

Furthermore, add run conditions that are active when the TrackingInputType is enabled for specific input types.

Changelog

  • Added TrackingState enum
  • Added TrackingInputType Resource
  • Exported new items into the prelude module
  • Extracted prioritize_ui_input and prioritize_egui_input systems from update_action_state
  • Integrated new systems into InputManagerPlugin
  • InputStreams now take Option for gamepad values

@Shute052
Copy link
Collaborator Author

@alice-i-cecile This isn't related to #185, but could you take a look at the parts about configure_sets? I'm not sure if it's going to work like I expect.

@Shute052 Shute052 changed the title Allow temporarily disabling of specific input type tracking Allow disabling of specific input type tracking Feb 20, 2024
@Shute052 Shute052 added the usability Reduce user friction label Feb 20, 2024
src/plugin.rs Outdated Show resolved Hide resolved
@alice-i-cecile
Copy link
Contributor

Okay, I definitely think this is a useful tool, and I really like the notion of having a way to keep track of which input streams we're subscribed to.

However, I don't want to add more complexity/features to the code until #321 is solved. I think that this is helpful to shape that sort of design though.

@Shute052 Shute052 changed the title Allow disabling of specific input type tracking Allow setting TrackingState for specific input type tracking Feb 20, 2024
@Shute052
Copy link
Collaborator Author

I'm also in favor of splitting InputStreams and converting UserInputs into traits.

@Shute052
Copy link
Collaborator Author

Shute052 commented Feb 22, 2024

Blocked until the new architecture has been implemented

@alice-i-cecile alice-i-cecile added the blocked Nothing to do yet label Feb 22, 2024
@Shute052 Shute052 changed the title Allow setting TrackingState for specific input type tracking Runtime disabling of specific input type tracking Feb 23, 2024
@alice-i-cecile
Copy link
Contributor

Closing: this will be easier to redo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Nothing to do yet usability Reduce user friction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants