|
Purpose |
Chooses an option from a menu with greying out | ||
|
Old name |
#define gm_choose map_g_choose | ||
|
Syntax |
int map_g_choose(mapnr, option, banned_list) | ||
|
Parameters |
int mapnr |
Map number to choose from | |
|
|
int* option |
Pointer to variable to hold chosen field | |
|
|
short* banned_list |
Pointer to an array of integers, terminating with zero, containing the field numbers to grey out | |
|
|
The parameter banned_list should point to an array of short integers, terminating with a zero, which gives the list of fields to be greyed out. | ||
|
Description |
The map_g_choose() function is similar to map_choose(). It allows the user to choose an option from a menu and, in addition, options can be greyed out to make them inaccessible to the user. If there are no fields to grey out, a pointer to a zero value should be passed. Never pass NULL as a value for the parameter banned_list. If all the fields have been greyed out, ESCAPE is returned without any user interaction. The initial value of the parameter option gives the field to be highlighted first of all. If it is greyed out, the next valid field will be used. This function restores the original value of the global variable range on exiting. It is implemented using the field_eg_choose() function, with the parameter flags set to the value (NR_KEYS | NOT_MISSING_FIELD). | ||
|
Return values |
Returns the value of the global variable abort_code | ||
|
See also |
|||
|
Example |
| ||