Table of Contents

 
EnableInput
 

Purpose

Enables input of characters to a text input object, or disables it entirely

 

Protoype

void CTextMngr::EnableInput (bool b_enable, string str_text_id = "")
 

Parameters

enable flag to enable or disable text input for the current object
text_id the ID of the text object to enable input for (not required for disabling)
 

Description

This function is used to enable or disable input handling for a given text object. The ID passed in through str_text_id is checked to ensure that it is an Input Text object, and then activated if the b_enable flag is TRUE. When a text object is enabled it can receive keystrokes via DoInput(), and it also has a blinking cursor at the end of the text. To disable text input (and the cursor), just pass FALSE, ignoring the ID parameter.

NOTE: You do not have to disable input by passing FALSE before enabling a new Input Text object.

 
Use
CTextMngr text;
// enable text input
text.EnableInput(true, "my_input");
// disable input
text.EnableInput(false); 
 

Prev: DoInput