Disabling User Input

From SIMboxWiki
Revision as of 22:46, 12 March 2013 by Seanjarvis (talk | contribs)
Jump to navigation Jump to search

Sometimes a situation arises where it would be convenient to temporarily disable user inputs. For example, if you want the user to enter numbers into a text box using the keypad without having those inputs interpreted as camera movement commands, you would want to do this. Use the following API calls:

• SimApi::InputDevices::enableUserInput(false) – disable user inputs.
• SimApi::InputDevices::enableUserInput(true) – enable user inputs.

Refer to the code sample below, which enables or disables user input depending on whether the edit text box is in focus:

void CPaneDialog::OnEnSetfocusEdit1()

void CPaneDialog::OnEnKillfocusEdit1()