The "vngen_option_create_ext_transformed" Function
#
SyntaxArgument | Type | Description |
---|---|---|
id | real/string | The unique identifier to use for the new option |
text | string | The option text to display over the background (or "" for none) |
sprite | sprite | The sprite to display as a background |
spr_hover | sprite/macro | The sprite to display as a background when hovered (or keyword none for default) |
spr_active | sprite/macro | The sprite to display as a background when selected (or keyword none for default) |
xorig | real/macro | The horizontal sprite offset, or origin point, relative to the top-left corner |
yorig | real/macro | The vertical sprite offset, or origin point, relative to the top-left corner |
x | real | The horizontal position to display the option |
y | real | The vertical position to display the option |
z | real | The drawing depth and list order of the option, relative to other options only |
tx | real/macro | The horizontal position to display text, relative to the option sprite top-left corner (or keyword auto for center) |
ty | real/macro | The vertical position to display text, relative to the option sprite top-left corner (or keyword auto for center) |
scaling | integer/macro | Sets the automatic scaling mode for the option |
font | font | The font to draw text in, where fnt_default is default |
color | color | The color to draw text in, where c_white is default |
hov_x | real | The horizontal offset to shift the option when hovered |
hov_y | real | The vertical offset to shift the option when hovered |
hov_xscale | real | The horizontal scale multiplier to shift the option when hovered |
hov_yscale | real | The vertical scale multiplier to shift the option when hovered |
hov_color | color | The color to draw text in when hovered |
sel_x | real | The horizontal offset to shift the option when selected |
sel_y | real | The vertical offset to shift the option when selected |
sel_xscale | real | The horizontal scale multiplier to shift the option when selected |
sel_yscale | real | The vertical scale multiplier to shift the option when selected |
sel_color | color | The color to draw text in when selected |
sel_duration | real | Sets the duration of hover/select animations, in seconds |
trans_in | script | Sets the transition in animation to perform |
trans_out | script | Sets the transition out animation to perform |
duration | real | Sets the duration of the transition animations, in seconds |
ease | integer/macro | Sets the ease override for all button animations |
#
DescriptionCreates a new option with extra features and hover and select transformations which will be displayed until any option in the current option block has been selected. The chosen option ID will be recorded as the selected choice. Options can selected by mouse/touch, or by other input devices with vngen_option_nav
and vngen_option_select
.
Unlike other entities, option z-index determines not just drawing depth, but also navigation order. Options with lower z-index will be considered lower in the list of options. If z-index is equal between two or more options, navigation order will automatically be set by reverse creation order, but this may or may not be visually correct. Therefore, it is recommended to always set z-index explicitly. The actual values used are inconsequential so long as they are ordered from highest to lowest.
Note that although this script is an action, it cannot be executed outside of a vngen_option
block. In this way, an entire option block can be thought of as a single action.
See Included Animations and Macros & Keywords for a list of available transition animations and ease modes.