Jump to content

Locking ship controls when using text field


Recommended Posts

By default, when the user enters text into a text field (DialogGUITextInput), the keystrokes are also forwarded to the game. So, if the user presses, say, spacebar to just add a space between words, they will accidentally stage the vessel. How do I prevent it?

I understand that the best practice is to use InputLockManager to set a control lock for ControlTypes.KEYBOARDINPUT when the text field is selected and remove it when it's deselected. But I don't see any events I can attach this behavior to. Nor do I see any (public) fields or properties of DialogGUITextInput that I can use to check if it has the focus.

Any ideas?

Edited by garwel
Link to comment
Share on other sites

  • 5 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...