Skip to content

Custom Menu Item

DeflatedPickle edited this page Jun 30, 2020 · 1 revision

Rawky has an event for when a menu is being built (EventMenuBuild). Attaching a listener to this kind of event will give you access to the JMenu object. You should test if this menu is of the type you want to add an item to, or you'll add one to every menu that calls the event.

To add your item to it, simply do:

it.addItem(...)

Inside of the listener, and you'll see the menu added next time you launch.

Clone this wiki locally