askf_special()

Purpose

Waits in a map field

Old names

#define wait_field askf_special
#define pause(mapnr,fieldnr) askf_special(mapnr,fieldnr,scrn_flags)

Syntax

int askf_special(mapnr, fieldnr, flags)

Parameters

int mapnr

Number of map in which to wait

 

int fieldnr

Number of field in which to wait

 

int flags

Parameter specifying display format

 

The parameter flags can take any of the values as for the global variable scrn_flags when used with the askf_x() functions

Description

The askf_special() function positions the cursor in the field passed as a parameter, and waits for any key to be pressed. The display format is specified by the parameter flags. The map must already be on the screen.

The global variables jump and clearfirst affect the behaviour of this function. If clearfirst is 0 and jump is TRUE, the function does not stop for user input. If clearfirst is 1, jump is set to FALSE and the program waits for user input.

If the user presses <Tab>, jump is set to TRUE and the function returns.

If the key pressed is <Esc>, the global variable abort_code is set to non-zero, otherwise it is set to zero.

Return values

Returns the value of the global variable abort_code

See also

askf_special(), askm_special()

Example

askf_special(6,1,BLANK_IF_ZERO);