Skip to content

UIMenuBarMenu Class

Definition

Namespace: Brine2D.UI

A single top-level menu in a UIMenuBar \(e\.g\. "File", "Edit", "View"\). Contains a list of UIMenuItem entries shown in a dropdown when the title is clicked.

C#
public class UIMenuBarMenu

Inheritance System.Object → UIMenuBarMenu

Constructors
UIMenuBarMenu\(string\)
Properties
Items Read-only view of the menu items.
Title Text displayed in the menu bar title strip.
Methods
Add\(UIMenuItem\) Adds a pre-built UIMenuItem and returns this.
Add\(string, bool, Action\) Adds a labeled item and returns this for fluent chaining.
AddSeparator() Adds a horizontal separator line and returns this.
FireItemSelected\(int\) Internal: fires OnItemSelected for the item at index and invokes its OnClick callback.
Events
OnItemSelected Fired when any enabled item in this menu is selected. Parameters are the zero-based item index and the item label.