Skip to main content

The "vngen_textbox_create_ext" Function

Syntax#

vngen_textbox_create_ext(id, sprite, xorig, yorig, x, y, z, scaling, transition, duration, ease);
ArgumentTypeDescription
idreal/stringThe unique identifier to use for the new textbox
spritespriteThe sprite to draw as a textbox
xorigreal/macroThe horizontal sprite offset, or origin point, relative to the top-left corner
yorigreal/macroThe vertical sprite offset, or origin point, relative to the top-left corner
xrealThe horizontal position to display the textbox, relative to the global offset
yrealThe vertical position to display the textbox, relative to the global offset
zrealThe drawing depth of the textbox, relative to other textboxes only
scalinginteger/macroSets the automatic scaling mode for the textbox
transitionscriptSets the transition animation to perform
durationrealSets the duration of the transition animation, in seconds
easeinteger/macroSets the ease override for the transition script

Description#

Creates a new textbox with extra options which will be displayed until vngen_textbox_destroy is run. Multiple textboxes can exist simultaneously, however no two textboxes may share the same ID. VNgen entity IDs are arbitrary and most can be either numbers or strings, but bear in mind that -1 is reserved as 'null' and cannot be used as an ID.

See Included Animations and Macros & Keywords for a list of available origin points, scaling modes, transition animations, and ease modes.

Example#

vngen_event() {
vngen_textbox_create_ext("tb", spr_textbox, orig_left, orig_bottom, 0, 1080, 0, scale_stretch_x, trans_wipe_right, 2, ease_sin_in_out);
}