Skip to main content

The "vngen_do_button_nav" Function

Syntax#

vngen_do_button_nav(amount);
ArgumentTypeDescription
amountintegerThe number of buttons to scroll

Description#

Navigates through a linear list of buttons, if any exist. The amount of buttons scrolled is arbitrary, where negative values scroll up and positive values scroll down. If a hover sound has been assigned in vngen_button_create_ext, it will be played upon running this script. If the input amount exceeds the size of the buttons menu, the selection will loop back around to the other side.

Note that navigation order is determined by the button z-index, and therefore improper configuration of options can result in unexpected navigation with this script.

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_nav for navigation.

Example#

//Scroll up
vngen_do_button_nav(-1);
//Scroll down
vngen_do_button_nav(1);