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

Allow push_input() to work when gui_disable_input is enabled on Viewports #78759

Closed

Conversation

YeldhamDev
Copy link
Member

In 3.*, if a Viewport had gui_disable_input enabled, it could still receive inputs via the input() method. This was handy if you wished to cherry-pick which inputs went into a sub-viewport (which is the case in my game).

In 4.*, however, this is not possible anymore. So this PR brings back the old behavior.

@YeldhamDev YeldhamDev added this to the 4.2 milestone Jun 27, 2023
@YeldhamDev YeldhamDev requested review from a team as code owners June 27, 2023 15:59
@akien-mga
Copy link
Member

CC @Sauermann

@Sauermann
Copy link
Contributor

I believe, that the suggested API is not ideal. My reasons for this are:

  • gui_disable_input was previously a Viewport-internal flag. With this change, callers of push_input now need to additionally check and respect the setting of gui_disable_input. This seems to be an unnecessary complication and seems unexpected.
  • The use-case showcases a missing functionality of SubViewportContainer and it is solvable without any changes to Viewport like in Enable InputEvent-filtering in SubViewportContainer #78762, so a local solution seems to be more fitting.

@YeldhamDev
Copy link
Member Author

Sounds even better! Closing in favor of that alternative.

@YeldhamDev YeldhamDev closed this Jun 27, 2023
@YeldhamDev YeldhamDev deleted the let_the_inputs_out! branch June 27, 2023 19:00
@YeldhamDev YeldhamDev removed this from the 4.2 milestone Jun 27, 2023
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.

3 participants