InputText Routine

TURBU

InputText Routine

 

Allows the user to enter a text string.

 

Syntax

 

function inputText(start: string; heroId: word): string;

 

Description

 

This routine opens the Text Input menu, allowing the user to enter a string of text.  This is commonly used for entering custom hero names, but can serve other purposes as well.

 

The start parameter contains an optional default string to be displayed.  This can be used to provide the default name for a hero.  The heroId parameter is the ID number of a hero whose name is being entered.  This is used to display the hero's portrait.  If 0 is passed to heroId, no portrait will be displayed.  The function returns the string that the user enters.

 

Example

 

To set a name for hero #1:

 

hero[1].name := inputText(hero[1].name, 1);

This help file was created with the free trial version of HelpScribble.