C# Class GTAVBETrainerDotNet.Menu.Menu

Menu
ファイルを表示 Open project: betenner/betrainer Class Usage Examples

Public Properties

Property Type Description
HasSubmenuSignOffset Point
LeftRightAdjustableSignOffset Point
Location Point
PageTextOffset Point
PlayBeep bool
Title MString
TitleAlign GlobalConst.HAlign
TitleBackColor Color
TitleFont GTA.Font
TitleOffset Point
TitleShadowColor Color
TitleShadowDistance Point
TitleTextColor Color
ToggleTextOffset Point

Public Methods

Method Description
Activate ( ) : void

Activate current menu item

Add ( MenuItem item ) : void

Adds a menu item into this menu.

Clear ( ) : void

Removes all menu items

Draw ( ) : void

Draw this menu

GetMenuItem ( int index ) : MenuItem

Gets the specified menu item

Menu ( MString title ) : System

Creates an instance of a menu.

Menu ( MString title, Point location ) : System

Creates an instance of a menu.

Menu ( MString title, Point location, MenuItem items ) : System

Creates an instance of a menu and adds initial items.

Menu ( MString title, Point location, int width, int itemHeight, int itemPerPage ) : System

Creates an instance of menu and set initial values.

Menu ( MString title, Point location, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage ) : System

Creates an instance of menu and set initial values.

Menu ( MString title, Point location, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage, MenuItem items ) : System

Creates an instance of menu and set initial values.

Menu ( MString title, int x, int y ) : System

Creates an instance of a menu.

Menu ( MString title, int x, int y, MenuItem items ) : System

Creates an instance of a menu and adds initial items.

Menu ( MString title, int x, int y, int width, int itemHeight, int itemPerPage ) : System

Creates an instance of menu and set initial values.

Menu ( MString title, int x, int y, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage ) : System

Creates an instance of menu and set initial values.

MoveDown ( ) : void

Moves the cursor down one item

MoveLeft ( ) : void

Moves the cursor to the previous page

MoveRight ( ) : void

Moves the cursor to the next page or enter the sub menu

MoveUp ( ) : void

Moves the cursor up one item

Remove ( MenuItem menuItem ) : void

Removes the specified menu item

Remove ( int index ) : void

Removes specified menu item

Private Methods

Method Description
EnsurePage ( ) : void
EnsureSelectedIndexInCurrentPage ( ) : void
GetFirstItemIndexInCurrentPage ( ) : int
GetLastItemIndexInCurrentPage ( ) : int
GetPageBySelectedIndex ( ) : int
GetRelativeSelectedIndexInPage ( ) : int

Method Details

Activate() public method

Activate current menu item
public Activate ( ) : void
return void

Add() public method

Adds a menu item into this menu.
public Add ( MenuItem item ) : void
item MenuItem Menu item
return void

Clear() public method

Removes all menu items
public Clear ( ) : void
return void

Draw() public method

Draw this menu
public Draw ( ) : void
return void

GetMenuItem() public method

Gets the specified menu item
public GetMenuItem ( int index ) : MenuItem
index int Index of the menu item
return MenuItem

Menu() public method

Creates an instance of a menu.
public Menu ( MString title ) : System
title MString Title of the menu
return System

Menu() public method

Creates an instance of a menu.
public Menu ( MString title, Point location ) : System
title MString Title of menu
location Point Location of the menu
return System

Menu() public method

Creates an instance of a menu and adds initial items.
public Menu ( MString title, Point location, MenuItem items ) : System
title MString Title of menu
location Point Location of the menu
items MenuItem Menu items
return System

Menu() public method

Creates an instance of menu and set initial values.
public Menu ( MString title, Point location, int width, int itemHeight, int itemPerPage ) : System
title MString Title of menu
location Point Location of the menu
width int Width of the menu in pixel
itemHeight int Item height of the menu in pixel
itemPerPage int Item count per page
return System

Menu() public method

Creates an instance of menu and set initial values.
public Menu ( MString title, Point location, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage ) : System
title MString Title of menu
location Point Location of the menu
width int Width of the menu in pixel
itemHeight int Item height of the menu in pixel
screenWidth int Screen width in pixel
screenHeight int Screen height in pixel
itemPerPage int Item count per page
return System

Menu() public method

Creates an instance of menu and set initial values.
public Menu ( MString title, Point location, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage, MenuItem items ) : System
title MString Title of menu
location Point Location of the menu
width int Width of the menu in pixel
itemHeight int Item height of the menu in pixel
screenWidth int Screen width in pixel
screenHeight int Screen height in pixel
itemPerPage int Item count per page
items MenuItem Menu items
return System

Menu() public method

Creates an instance of a menu.
public Menu ( MString title, int x, int y ) : System
title MString Title of the menu
x int X position of the menu
y int Y position of the menu
return System

Menu() public method

Creates an instance of a menu and adds initial items.
public Menu ( MString title, int x, int y, MenuItem items ) : System
title MString Title of menu
x int X position of the menu
y int Y position of the menu
items MenuItem Menu items
return System

Menu() public method

Creates an instance of menu and set initial values.
public Menu ( MString title, int x, int y, int width, int itemHeight, int itemPerPage ) : System
title MString Title of menu
x int X position of the menu
y int Y position of the menu
width int Width of the menu in pixel
itemHeight int Item height of the menu in pixel
itemPerPage int Item count per page
return System

Menu() public method

Creates an instance of menu and set initial values.
public Menu ( MString title, int x, int y, int width, int itemHeight, int screenWidth, int screenHeight, int itemPerPage ) : System
title MString Title of menu
x int X position of the menu
y int Y position of the menu
width int Width of the menu in pixel
itemHeight int Item height of the menu in pixel
screenWidth int Screen width in pixel
screenHeight int Screen height in pixel
itemPerPage int Item count per page
return System

MoveDown() public method

Moves the cursor down one item
public MoveDown ( ) : void
return void

MoveLeft() public method

Moves the cursor to the previous page
public MoveLeft ( ) : void
return void

MoveRight() public method

Moves the cursor to the next page or enter the sub menu
public MoveRight ( ) : void
return void

MoveUp() public method

Moves the cursor up one item
public MoveUp ( ) : void
return void

Remove() public method

Removes the specified menu item
public Remove ( MenuItem menuItem ) : void
menuItem MenuItem Menu item object
return void

Remove() public method

Removes specified menu item
public Remove ( int index ) : void
index int Index of menu item
return void

Property Details

HasSubmenuSignOffset public_oe property

Gets or sets the has submenu sign offset
public Point HasSubmenuSignOffset
return Point

LeftRightAdjustableSignOffset public_oe property

Gets or sets the left/right adjustable sign offset
public Point LeftRightAdjustableSignOffset
return Point

Location public_oe property

Gets or sets the location of the top-left point of the menu in pixel
public Point Location
return Point

PageTextOffset public_oe property

Gets or sets the page text offset
public Point PageTextOffset
return Point

PlayBeep public_oe property

Gets or sets a value indicating whether play a beep sound when moving cursor
public bool PlayBeep
return bool

Title public_oe property

Menu title
public MString Title
return MString

TitleAlign public_oe property

Menu title alignment
public GlobalConst.HAlign TitleAlign
return GlobalConst.HAlign

TitleBackColor public_oe property

Menu title back color
public Color TitleBackColor
return Color

TitleFont public_oe property

Menu title font
public GTA.Font TitleFont
return GTA.Font

TitleOffset public_oe property

Gets or sets the title text offset
public Point TitleOffset
return Point

TitleShadowColor public_oe property

Menu title shadow color
public Color TitleShadowColor
return Color

TitleShadowDistance public_oe property

Menu title offset
public Point TitleShadowDistance
return Point

TitleTextColor public_oe property

Menu title text color
public Color TitleTextColor
return Color

ToggleTextOffset public_oe property

Gets or sets the toggle text offset
public Point ToggleTextOffset
return Point