Difference between revisions of "Disabling User Input"

From SIMboxWiki
Jump to navigation Jump to search
Line 16: Line 16:
[[Category:FAQ]] [[Category:Help]]

Revision as of 22:46, 12 March 2013

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()