C# Класс GTAVBETrainerDotNet.Menu.Menu

Menu
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
EnsurePage ( ) : void
EnsureSelectedIndexInCurrentPage ( ) : void
GetFirstItemIndexInCurrentPage ( ) : int
GetLastItemIndexInCurrentPage ( ) : int
GetPageBySelectedIndex ( ) : int
GetRelativeSelectedIndexInPage ( ) : int

Описание методов

Activate() публичный Метод

Activate current menu item
public Activate ( ) : void
Результат void

Add() публичный Метод

Adds a menu item into this menu.
public Add ( MenuItem item ) : void
item MenuItem Menu item
Результат void

Clear() публичный Метод

Removes all menu items
public Clear ( ) : void
Результат void

Draw() публичный Метод

Draw this menu
public Draw ( ) : void
Результат void

GetMenuItem() публичный Метод

Gets the specified menu item
public GetMenuItem ( int index ) : MenuItem
index int Index of the menu item
Результат MenuItem

Menu() публичный Метод

Creates an instance of a menu.
public Menu ( MString title ) : System
title MString Title of the menu
Результат System

Menu() публичный Метод

Creates an instance of a menu.
public Menu ( MString title, Point location ) : System
title MString Title of menu
location Point Location of the menu
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

Menu() публичный Метод

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
Результат System

MoveDown() публичный Метод

Moves the cursor down one item
public MoveDown ( ) : void
Результат void

MoveLeft() публичный Метод

Moves the cursor to the previous page
public MoveLeft ( ) : void
Результат void

MoveRight() публичный Метод

Moves the cursor to the next page or enter the sub menu
public MoveRight ( ) : void
Результат void

MoveUp() публичный Метод

Moves the cursor up one item
public MoveUp ( ) : void
Результат void

Remove() публичный Метод

Removes the specified menu item
public Remove ( MenuItem menuItem ) : void
menuItem MenuItem Menu item object
Результат void

Remove() публичный Метод

Removes specified menu item
public Remove ( int index ) : void
index int Index of menu item
Результат void

Описание свойств

HasSubmenuSignOffset публичное свойство

Gets or sets the has submenu sign offset
public Point HasSubmenuSignOffset
Результат Point

LeftRightAdjustableSignOffset публичное свойство

Gets or sets the left/right adjustable sign offset
public Point LeftRightAdjustableSignOffset
Результат Point

Location публичное свойство

Gets or sets the location of the top-left point of the menu in pixel
public Point Location
Результат Point

PageTextOffset публичное свойство

Gets or sets the page text offset
public Point PageTextOffset
Результат Point

PlayBeep публичное свойство

Gets or sets a value indicating whether play a beep sound when moving cursor
public bool PlayBeep
Результат bool

Title публичное свойство

Menu title
public MString Title
Результат MString

TitleAlign публичное свойство

Menu title alignment
public GlobalConst.HAlign TitleAlign
Результат GlobalConst.HAlign

TitleBackColor публичное свойство

Menu title back color
public Color TitleBackColor
Результат Color

TitleFont публичное свойство

Menu title font
public GTA.Font TitleFont
Результат GTA.Font

TitleOffset публичное свойство

Gets or sets the title text offset
public Point TitleOffset
Результат Point

TitleShadowColor публичное свойство

Menu title shadow color
public Color TitleShadowColor
Результат Color

TitleShadowDistance публичное свойство

Menu title offset
public Point TitleShadowDistance
Результат Point

TitleTextColor публичное свойство

Menu title text color
public Color TitleTextColor
Результат Color

ToggleTextOffset публичное свойство

Gets or sets the toggle text offset
public Point ToggleTextOffset
Результат Point