Skip to content

Class LemonUI::Menus::NativeMenu

ClassList > LemonUI > Menus > NativeMenu

Menu that looks like the ones used by Rockstar.

Inherits the following classes: LemonUI::IContainer, IEnumerable< NativeItem >

Public Static Attributes

Type Name
readonly Sound DefaultActivatedSound = = new Sound("HUD_FRONTEND_DEFAULT_SOUNDSET", "SELECT")
The default Sound played when the currentNativeItem is changed or activated.
readonly Sound DefaultCloseSound = = new Sound("HUD_FRONTEND_DEFAULT_SOUNDSET", "BACK")
The default Sound played when the menu is closed.
readonly Sound DefaultDisabledSound = = new Sound("HUD_FRONTEND_DEFAULT_SOUNDSET", "ERROR")
The default Sound played when the user activates aNativeItem that is disabled.
readonly Sound DefaultLeftRightSound = = new Sound("HUD_FRONTEND_DEFAULT_SOUNDSET", "NAV_LEFT_RIGHT")
The default Sound played when the user navigates Left and Right on aNativeSlidableItem .
readonly Sound DefaultUpDownSound = = new Sound("HUD_FRONTEND_DEFAULT_SOUNDSET", "NAV_UP_DOWN")
The default Sound played when the user navigates Up and Down.

Public Properties

Type Name
property bool AcceptsInput
If the menu accepts user input for navigation.
property Alignment Alignment
The alignment of the menu.
property I2Dimensional Banner
The banner shown at the top of the menu.
property ScaledText BannerText
The text shown on top of the banner.
property InstructionalButtons Buttons
The instructional buttons shown in the bottom right.
property bool CloseOnInvalidClick
If the menu should be closed when the user clicks out of bounds (aka anywhere else other than the items).
property string?? Description
The description used when this menu is used as a submenu.
property Font DescriptionFont
The font of description text.
property bool DisableControls
If the conflictive controls should be disabled while the menu is open.
property HeaderBehavior HeaderBehavior
The behavior of the black bar showing the name.
property int HeldTime
The time between item changes when holding left, right, up or down.
property CountVisibility ItemCount
If the count of items should be shown on the right of the name.
property Font ItemCountFont
The font of item count text.
property List< NativeItem > Items
The items that this menu contain.
property int MaxItems
The maximum allowed number of items in the menu at once.
property string?? Name
The name of this menu.
property Font NameFont
The font of name text.
property string?? NoItemsText
Text shown when there are no items in the menu.
property PointF Offset
The offset of the menu position.
property NativeMenu Parent
The parent menu of this menu.
property List< Control > RequiredControls
The controls that are required for some menu operations.
property bool ResetCursorWhenOpened
If the cursor should be reset when the menu is opened.
property bool RotateCamera
If the camera should be rotated when the cursor is on the left and right corners of the screen.
property bool SafeZoneAware
If this menu should be aware of the Safe Zone when doing calculations.
property int? SelectedIndex
The current index of the menu.
property NativeItem SelectedItem
Returns the currently selected item.
property Sound SoundActivated
The Sound played when aNativeItem is activated.
property Sound SoundClose
The Sound played when the menu is closed.
property Sound SoundDisabled
The Sound played when the user activates aNativeItem that is disabled.
property Sound SoundLeftRight
The Sound played when the user navigates Left and Right on aNativeSlidableItem .
property Sound SoundOpened
The Sound played when the menu is opened.
property Sound SoundUpDown
The Sound played when the user navigates Up or Down the menu.
property string?? Subtitle
The name of the menu.
property SubtitleBehavior SubtitleBehavior
The behavior of the black bar showing the name.
property ScaledText Title
The text shown on top of the banner.
property Font TitleFont
The font of the text shown on top of the banner.
property bool UseMouse
If the mouse should be used for navigating the menu.
property bool?????? Visible
If the menu is visible on the screen.
property float Width
The width of the menu.

Public Properties inherited from LemonUI::IProcessable

See LemonUI::IProcessable

Type Name
property bool Visible
If this processable item is visible on the screen.

Public Functions

Type Name
void Add (NativeItem item)
Adds an item at the end of the menu.
void Add (NativeMenu menu)
Adds a specific menu as a submenu with an item.
virtual void Add (int position, NativeItem item)
Adds an item at the specified position.
NativeSubmenuItem AddSubMenu (NativeMenu menu)
Adds a specific menu as a submenu with an item.
NativeSubmenuItem AddSubMenu (NativeMenu menu, string endlabel)
Adds a specific menu as a submenu with an item and endlabel string.
void Back ()
Returns to the previous menu or closes the existing one.
void Clear ()
Removes all of the items from this menu.
void Close ()
Closes the menu.
bool Contains (NativeItem item)
Checks if an item is part of the menu.
IEnumerator< NativeItem > GetEnumerator ()
NativeMenu (string title)
Creates a new menu with the specified title.
NativeMenu (string bqnnerText, string name)
Creates a new menu with the specified banner text and name.
NativeMenu (string bqnnerText, string name, string description)
Creates a new menu with the specified banner text, name and description.
NativeMenu (string bqnnerText, string name, string description, I2Dimensional banner)
Creates a new menu with the specified banner text, name, description and banner.
void Next ()
Moves to the next item. Does nothing if the menu has no items.
void Open ()
Opens the menu.
void Previous ()
Moves to the previous item. Does nothing if the menu has no items.
virtual void Process ()
Draws the menu and handles the controls.
virtual void Recalculate ()
Calculates the positions and sizes of the elements.
void Remove (NativeItem item)
Removes an item from the menu.
void Remove (Func< NativeItem, bool > pred)
Removes the items that match the predicate.
void ResetCursor ()
Resets the current position of the cursor.

Public Functions inherited from LemonUI::IContainer

See LemonUI::IContainer

Type Name
void Add (T item)
Adds the specified item into the Container.
void Clear ()
Clears all of the items in the container.
bool Contains (T item)
Checks if the item is part of the container.
void Remove (T item)
Removes the item from the container.
void Remove (Func< T, bool > func)
Removes all of the items that match the function.

Public Functions inherited from LemonUI::IRecalculable

See LemonUI::IRecalculable

Type Name
void Recalculate ()
Recalculates the values.

Public Functions inherited from LemonUI::IProcessable

See LemonUI::IProcessable

Type Name
void Process ()
Processes the object.

Public Static Attributes Documentation

variable DefaultActivatedSound

readonly Sound LemonUI.Menus.NativeMenu.DefaultActivatedSound;

variable DefaultCloseSound

readonly Sound LemonUI.Menus.NativeMenu.DefaultCloseSound;

variable DefaultDisabledSound

readonly Sound LemonUI.Menus.NativeMenu.DefaultDisabledSound;

variable DefaultLeftRightSound

readonly Sound LemonUI.Menus.NativeMenu.DefaultLeftRightSound;

variable DefaultUpDownSound

readonly Sound LemonUI.Menus.NativeMenu.DefaultUpDownSound;

Public Properties Documentation

property AcceptsInput

bool LemonUI.Menus.NativeMenu.AcceptsInput;

property Alignment

Alignment LemonUI.Menus.NativeMenu.Alignment;

property Banner

I2Dimensional LemonUI.Menus.NativeMenu.Banner;

property BannerText

ScaledText LemonUI.Menus.NativeMenu.BannerText;

property Buttons

InstructionalButtons LemonUI.Menus.NativeMenu.Buttons;

property CloseOnInvalidClick

bool LemonUI.Menus.NativeMenu.CloseOnInvalidClick;

property Description

string?? LemonUI.Menus.NativeMenu.Description;

property DescriptionFont

Font LemonUI.Menus.NativeMenu.DescriptionFont;

property DisableControls

bool LemonUI.Menus.NativeMenu.DisableControls;

property HeaderBehavior

HeaderBehavior LemonUI.Menus.NativeMenu.HeaderBehavior;

property HeldTime

The time between item changes when holding left, right, up or down.

int LemonUI.Menus.NativeMenu.HeldTime;

This property can be set to zero to completely disable it.

property ItemCount

CountVisibility LemonUI.Menus.NativeMenu.ItemCount;

property ItemCountFont

Font LemonUI.Menus.NativeMenu.ItemCountFont;

property Items

List<NativeItem> LemonUI.Menus.NativeMenu.Items;

property MaxItems

int LemonUI.Menus.NativeMenu.MaxItems;

property Name

The name of this menu.

string?? LemonUI.Menus.NativeMenu.Name;

This is shown under the menu banner, and by the menu items when added as a submenu.

property NameFont

Font LemonUI.Menus.NativeMenu.NameFont;

property NoItemsText

string?? LemonUI.Menus.NativeMenu.NoItemsText;

property Offset

PointF LemonUI.Menus.NativeMenu.Offset;

property Parent

NativeMenu LemonUI.Menus.NativeMenu.Parent;

property RequiredControls

The controls that are required for some menu operations.

List<Control> LemonUI.Menus.NativeMenu.RequiredControls;

Add controls to this list when you want to detect them as pressed while the menu is open.

property ResetCursorWhenOpened

bool LemonUI.Menus.NativeMenu.ResetCursorWhenOpened;

property RotateCamera

bool LemonUI.Menus.NativeMenu.RotateCamera;

property SafeZoneAware

bool LemonUI.Menus.NativeMenu.SafeZoneAware;

property SelectedIndex

int? LemonUI.Menus.NativeMenu.SelectedIndex;

property SelectedItem

NativeItem LemonUI.Menus.NativeMenu.SelectedItem;

property SoundActivated

Sound LemonUI.Menus.NativeMenu.SoundActivated;

property SoundClose

Sound LemonUI.Menus.NativeMenu.SoundClose;

property SoundDisabled

Sound LemonUI.Menus.NativeMenu.SoundDisabled;

property SoundLeftRight

Sound LemonUI.Menus.NativeMenu.SoundLeftRight;

property SoundOpened

Sound LemonUI.Menus.NativeMenu.SoundOpened;

property SoundUpDown

Sound LemonUI.Menus.NativeMenu.SoundUpDown;

property Subtitle

string?? LemonUI.Menus.NativeMenu.Subtitle;

property SubtitleBehavior

SubtitleBehavior LemonUI.Menus.NativeMenu.SubtitleBehavior;

property Title

ScaledText LemonUI.Menus.NativeMenu.Title;

property TitleFont

Font LemonUI.Menus.NativeMenu.TitleFont;

property UseMouse

bool LemonUI.Menus.NativeMenu.UseMouse;

property Visible

bool?????? LemonUI.Menus.NativeMenu.Visible;

property Width

float LemonUI.Menus.NativeMenu.Width;

Public Functions Documentation

function Add [1/3]

Adds an item at the end of the menu.

void LemonUI::Menus::NativeMenu::Add (
    NativeItem item
) 

Parameters:

  • item The item to add.

function Add [2/3]

Adds a specific menu as a submenu with an item.

void LemonUI::Menus::NativeMenu::Add (
    NativeMenu menu
) 

Parameters:

  • menu The menu to add.

function Add [3/3]

Adds an item at the specified position.

inline virtual void LemonUI::Menus::NativeMenu::Add (
    int position,
    NativeItem item
) 

Parameters:

  • position The position of the item.
  • item The item to add.

function AddSubMenu [1/2]

Adds a specific menu as a submenu with an item.

inline NativeSubmenuItem LemonUI::Menus::NativeMenu::AddSubMenu (
    NativeMenu menu
) 

Parameters:

  • menu The menu to add.

Returns:

The item that points to the submenu.

function AddSubMenu [2/2]

Adds a specific menu as a submenu with an item and endlabel string.

inline NativeSubmenuItem LemonUI::Menus::NativeMenu::AddSubMenu (
    NativeMenu menu,
    string endlabel
) 

Parameters:

  • menu The menu to add.
  • endlabel The alternative title of the item, shown on the right.

Returns:

The item that points to the submenu.

function Back

inline void LemonUI::Menus::NativeMenu::Back () 

function Clear

inline void LemonUI::Menus::NativeMenu::Clear () 

function Close

void LemonUI::Menus::NativeMenu::Close () 

function Contains

Checks if an item is part of the menu.

bool LemonUI::Menus::NativeMenu::Contains (
    NativeItem item
) 

Parameters:

  • item The item to check.

function GetEnumerator [1/2]

IEnumerator< NativeItem > LemonUI::Menus::NativeMenu::GetEnumerator () 

function NativeMenu [2/5]

Creates a new menu with the specified title.

inline LemonUI::Menus::NativeMenu::NativeMenu (
    string title
) 

Parameters:

  • title The title of the menu.

function NativeMenu [3/5]

Creates a new menu with the specified banner text and name.

inline LemonUI::Menus::NativeMenu::NativeMenu (
    string bqnnerText,
    string name
) 

Parameters:

  • bqnnerText The title of the menu.
  • name The name of this menu.

function NativeMenu [4/5]

Creates a new menu with the specified banner text, name and description.

inline LemonUI::Menus::NativeMenu::NativeMenu (
    string bqnnerText,
    string name,
    string description
) 

Parameters:

  • bqnnerText The title of the menu.
  • name The name of this menu.
  • description The description used for submenus.

function NativeMenu [5/5]

Creates a new menu with the specified banner text, name, description and banner.

inline LemonUI::Menus::NativeMenu::NativeMenu (
    string bqnnerText,
    string name,
    string description,
    I2Dimensional banner
) 

Parameters:

  • bqnnerText The title of the menu.
  • name The name of this menu.
  • description The description used for submenus.
  • banner The drawable to use as the banner.

function Next

inline void LemonUI::Menus::NativeMenu::Next () 

function Open

void LemonUI::Menus::NativeMenu::Open () 

function Previous

inline void LemonUI::Menus::NativeMenu::Previous () 

function Process

inline virtual void LemonUI::Menus::NativeMenu::Process () 

function Recalculate

inline virtual void LemonUI::Menus::NativeMenu::Recalculate () 

function Remove [1/2]

Removes an item from the menu.

inline void LemonUI::Menus::NativeMenu::Remove (
    NativeItem item
) 

Parameters:

  • item The item to remove.

function Remove [2/2]

Removes the items that match the predicate.

inline void LemonUI::Menus::NativeMenu::Remove (
    Func< NativeItem , bool > pred
) 

Parameters:

  • pred The function to use as a check.

function ResetCursor

inline void LemonUI::Menus::NativeMenu::ResetCursor () 

The documentation for this class was generated from the following file repos/LemonUI/LemonUI/Menus/NativeMenu.cs