C# Class RAGENativeUI.MenuPool

Helper class that handles all of your Menus. After instatiating it, you will have to add your menu by using the Add method.
Show file Open project: alexguirre/RAGENativeUI Class Usage Examples

Public Methods

Method Description
Add ( UIMenu menu ) : void

Add your menu to the menu pool.

AddSubMenu ( UIMenu menu, string text ) : UIMenu

Create and add a submenu to the menu pool. Adds an item with the given text to the menu, creates a corresponding submenu, and binds the submenu to the item. The submenu inherits its title from the menu, and its subtitle from the item text.

CloseAllMenus ( ) : void

Closes all of your menus.

Draw ( ) : void

Draws all visible menus.

DrawBanners ( Graphics g ) : void

Draw all of your menus' custom banners.

IsAnyMenuOpen ( ) : bool

Checks if any menu is currently visible.

ProcessControl ( ) : void

Processes all of your visible menus' controls.

ProcessKey ( Keys key ) : void

Processes all of your visible menus' keys.

ProcessMenus ( ) : void

Process all of your menus' functions. Call this in a tick event.

ProcessMouse ( ) : void

Processes all of your visible menus' mouses.

RefreshIndex ( ) : void

Refresh index of every menu in the pool. Use this after you have finished constructing the entire menu pool.

Remove ( UIMenu menu ) : void

Removes the specified menu from the pool

ResetKey ( Common menuControl ) : void
ResetMenus ( bool resetLists, bool resetCheckboxes ) : void

Sets the index of all lists to 0 and unchecks all the checkboxes from your menus.

SetBannerType ( RAGENativeUI.Elements.ResRectangle bannerType ) : void
SetBannerType ( Sprite bannerType ) : void
SetBannerType ( Texture banner ) : void
SetKey ( Common menuControl, GameControl control ) : void
SetKey ( Common menuControl, GameControl control, int controllerIndex ) : void
SetKey ( Common menuControl, Keys control ) : void
ToList ( ) : List

Returns all of your menus.

Private Methods

Method Description
DrawBanners ( GraphicsEventArgs canvas ) : void

Method Details

Add() public method

Add your menu to the menu pool.
public Add ( UIMenu menu ) : void
menu UIMenu
return void

AddSubMenu() public method

Create and add a submenu to the menu pool. Adds an item with the given text to the menu, creates a corresponding submenu, and binds the submenu to the item. The submenu inherits its title from the menu, and its subtitle from the item text.
public AddSubMenu ( UIMenu menu, string text ) : UIMenu
menu UIMenu The parent menu to which the submenu must be added.
text string The name of the submenu.
return UIMenu

CloseAllMenus() public method

Closes all of your menus.
public CloseAllMenus ( ) : void
return void

Draw() public method

Draws all visible menus.
public Draw ( ) : void
return void

DrawBanners() public method

Draw all of your menus' custom banners.
public DrawBanners ( Graphics g ) : void
g Graphics The to draw on.
return void

IsAnyMenuOpen() public method

Checks if any menu is currently visible.
public IsAnyMenuOpen ( ) : bool
return bool

ProcessControl() public method

Processes all of your visible menus' controls.
public ProcessControl ( ) : void
return void

ProcessKey() public method

Processes all of your visible menus' keys.
public ProcessKey ( Keys key ) : void
key Keys
return void

ProcessMenus() public method

Process all of your menus' functions. Call this in a tick event.
public ProcessMenus ( ) : void
return void

ProcessMouse() public method

Processes all of your visible menus' mouses.
public ProcessMouse ( ) : void
return void

RefreshIndex() public method

Refresh index of every menu in the pool. Use this after you have finished constructing the entire menu pool.
public RefreshIndex ( ) : void
return void

Remove() public method

Removes the specified menu from the pool
public Remove ( UIMenu menu ) : void
menu UIMenu
return void

ResetKey() public method

public ResetKey ( Common menuControl ) : void
menuControl Common
return void

ResetMenus() public method

Sets the index of all lists to 0 and unchecks all the checkboxes from your menus.
public ResetMenus ( bool resetLists, bool resetCheckboxes ) : void
resetLists bool If true the index of all lists will be set to 0.
resetCheckboxes bool If true all the checkboxes will be unchecked.
return void

SetBannerType() public method

public SetBannerType ( RAGENativeUI.Elements.ResRectangle bannerType ) : void
bannerType RAGENativeUI.Elements.ResRectangle
return void

SetBannerType() public method

public SetBannerType ( Sprite bannerType ) : void
bannerType RAGENativeUI.Elements.Sprite
return void

SetBannerType() public method

public SetBannerType ( Texture banner ) : void
banner Texture
return void

SetKey() public method

public SetKey ( Common menuControl, GameControl control ) : void
menuControl Common
control GameControl
return void

SetKey() public method

public SetKey ( Common menuControl, GameControl control, int controllerIndex ) : void
menuControl Common
control GameControl
controllerIndex int
return void

SetKey() public method

public SetKey ( Common menuControl, Keys control ) : void
menuControl Common
control Keys
return void

ToList() public method

Returns all of your menus.
public ToList ( ) : List
return List