VgaGames 3 - Miscellaneous man-pages

[.. upper level ..]

VG3_input_image_select()

[added in version 1.2]

Show a set of images for selecting an element.
SYNTAX
int VG3_input_image_select(struct vg3_window *wstruct, const char *text, struct vg3_image **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
- 0: no
- 1: zoom to the size of the window
- 2 to 99: zoom from 2 to 99 percent 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()