VgaGames 3 - Miscellaneous man-pages

[.. upper level ..]

VG3_input_box()

Show an input-box for entering a textline.
SYNTAX
int VG3_input_box(struct vg3_window *wstruct, int fcolor, int bcolor, const char *text, char *ebuf, size_t esize)

FUNCTION PARAMETERS
wstruct Window-struct
fcolor Foreground color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM)
bcolor Background color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM)
text Information text
ebuf For returning entered textline, may contain an initial text
esize Maximum number of bytes for textline including terminating null

RETURN VALUE
Returns integer: - 1: OK - 0: No textline 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 an input-box on top of the actual window, in which a textline can be entered, which will be returned. Some special characters may be entered using the tabulator-key repeatedly. Pressing the return-key returns the entered textline, pressing the escape-key discards any entered text and returns. The current background image will be dimmed out and used as background for the box. The background color bcolor may be VGAG3_COLOR_TRANSPARENT.

SEE ALSO
VG3_input_select()