-
-
Notifications
You must be signed in to change notification settings - Fork 28
Instructional Buttons
Alexander Schmid edited this page Dec 7, 2019
·
1 revision
These are instructional buttons. NativeUI provides a way to add more buttons to that array.
You can disable them completely by using the DisableInstructionalButtons method.
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!
To remove a button you just call the RemoveInstructionalButton method.
myMenu.RemoveInstructionalButton(myButton);