Skip to main content

The "vngen_do_button_select" Function

Syntax#

vngen_do_button_select([id]);
ArgumentTypeDescription
idreal/stringOptional: The button ID to select (default: current highlighted button)

Description#

Selects the currently-highlighted button, if any, and records its ID. If a selection sound has been assigned in vngen_button_create_ext, it will be played upon running this script.

If a button ID is supplied, it will be selected directly, ignoring navigation.

This script is not an action, and is intended to be run in keyboard and gamepad input events. Mouse and touch support are built-in and do not require vngen_do_button_select to make selections.

Example#

if (keyboard_check_released(vk_enter)) {
vngen_do_button_select();
}
if (keyboard_check_released(ord("2"))) {
vngen_do_button_select("btn2");
}