Instructional Buttons - Guad/NativeUI GitHub Wiki

Instructional Buttons picture

These are instructional buttons. NativeUI provides a way to add more buttons to that array.

Disabling Instructional Buttons

You can disable them completely by using the DisableInstructionalButtons method.

Adding buttons

You can easily set up your button using the InstructionalButton class. You can use GTA.Control for buttons, or you can use keyboard strings.

// GTA.Control button
var myButton = new InstructionalButton(GTA.Control.Jump, "Favorite");
// string button
var anotherButton = new InstructionalButton("K", "Kill");

You can also bind the button to an UIMenuItem so it's only shown when the item is selected.

myButton.BindToItem(myItem);

Then you add the button to your menu.

myMenu.AddInstructionalButton(myButton);

And you're done!

Removing buttons

To remove a button you just call the RemoveInstructionalButton method.

myMenu.RemoveInstructionalButton(myButton);