Adding a Drop Down Menu
How to add our own Drop Down Menu
Last updated
How to add our own Drop Down Menu
Last updated
With a valid menu loaded, in most sections of the Editor we can use the following code to add our own dropdown menu:
This will add a new Demo Tools
entry to the top bar of the Editor:
The name
argument is used for the programmatic name, used for the menu path:
The label
argument is what actually gets displayed in the UI
The owner
argument is useful for if we ever want to remove our menu:
Note: In UE 5.5 Epic provided better support for the above code style to work with ToolBars, this is for UE 5.0-5.4
For ToolBar Menus such as Sequencer, the above code does not work before UE 5.5. Instead, we need to create our own Toolbar Dropdown Menu Class and use it instead.
This is using concepts covered in the Menu Class section, but here is a minimal class that will let us add a Dropdown Menu to Sequencer:
They key to this class is that its entry_type
has been updated to TOOL_BAR_COMBO_BUTTON
. This will allow us to add it to Sequencer and other Tool Bars
With our ToolbarDropdownMenu class initialized, we can run the following to add our Dropdown Menu to Sequencer:
This will add a new Demo Tools
entry to Sequencer's Toolbar: