Difference between revisions of "Disabling User Input"
Jump to navigation
Jump to search
Leslie Brown (talk | contribs) |
Seanjarvis (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 16: | Line 16: | ||
<br> | <br> | ||
− | [[Category:FAQ]] [[Category:Help]] | + | [[Category:SDK]][[Category:Development_Articles]][[Category:FAQ]][[Category:Help]] |
Latest revision as of 22:47, 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() { SimApi::InputDevices::enableUserInput(false); } void CPaneDialog::OnEnKillfocusEdit1() { SimApi::InputDevices::enableUserInput(true); }