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

[BUG] Game input disable does not disable game input #3

Open
schlosrat opened this issue Apr 2, 2023 · 1 comment
Open

[BUG] Game input disable does not disable game input #3

schlosrat opened this issue Apr 2, 2023 · 1 comment

Comments

@schlosrat
Copy link

You're calling game.Input.Flight.Enable() and game.Input.Flight.Disable, but these have zero effect. When using your mod, it will correctly detect that the player has clicked in the renaming input field and indicate (incorrectly) that game input is disabled. If you press "." or "," while in the input field timewarp is accelerated/decelerated respectively. There's nothing wrong with your decision logic in OnGui, but what you need is to call GameManager.Instance.Game.Input.Enable() and GameManager.Instance.Game.Input.Disable() to get the effect you're seeking.

I've used your logic with this call in a mod of mine and that seems to work. I learned it from ShadowDev's NoteBook mod for KSP2: https://github.com/Bit-Studios/NoteBook

@ColinZeidler
Copy link
Owner

I did use that global input disable toggle at one point, but had an issue where after enabling again if you went to the map everything got disabled again until you used the UI button to return to flight.
I'll check if this is no longer the case and push an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants