VgaGames 3 - Miscellaneous man-pages

[.. upper level ..]

VG3_input_image_select()

Show a set of images for selecting an element.
SYNTAX
int VG3_input_image_select(void *wstruct, const char *text, void **imgsel, int imgsize, int zoom)

FUNCTION PARAMETERS
wstruct Window-struct
text Title text
imgsel A field of images for selection
imgsize Field size of imgsel (number of elements)
zoom Whether zoom images to the size of the window

RETURN VALUE
Returns integer: - >=1: OK - number of selected element - 0: No selection because of pressing escape-key - -1: failure - -2: Got request for closing the window and exiting the game

ERRORS
On error VG3_errmsg() returns: EINVAL - error in argument ENOSYS - cannot create image ENOMEM - cannot get memory

DESCRIPTION
Show a set of images for selecting an element on top of the actual window. The images are shown sequentially for selection. Pressing the return-key selects the current image returning the element-number, pressing the escape-key discards selecting and returns 0. Navigate with the cursor-keys cursor-left and cursor-right. The current background image will be dimmed out and used as background for the box. The field of images may contain NULL-elements, indicating that this image-element is being deactivated. The field size imgsize must also count the deactivated elements.

SEE ALSO
VG3_input_select()