C# 클래스 RAGENativeUI.UIMenu

Base class for RAGENativeUI. Calls the next events: OnIndexChange, OnListChanged, OnCheckboxChange, OnItemSelect, OnMenuClose, OnMenuchange.
파일 보기 프로젝트 열기: alexguirre/RAGENativeUI 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AUDIO_BACK string
AUDIO_ERROR string
AUDIO_LEFTRIGHT string
AUDIO_LIBRARY string
AUDIO_SELECT string
AUDIO_UPDOWN string
AllowCameraMovement bool
ControlDisablingEnabled bool
FormatDescriptions bool
HoldTimeBeforeScroll uint
MenuItems List
MouseControlsEnabled bool
MouseEdgeEnabled bool
ResetCursorOnOpen bool

공개 메소드들

메소드 설명
AddInstructionalButton ( InstructionalButton button ) : void
AddItem ( UIMenuItem item ) : void

Add an item to the menu.

BindMenuToItem ( UIMenu menuToBind, UIMenuItem itemToBindTo ) : void

Bind a menu to a button. When the button is clicked that menu will open.

Clear ( ) : void

Remove all items from the menu.

DisEnableControls ( bool enable ) : void

Enable or disable all controls but the necessary to operate a menu.

DisableInstructionalButtons ( bool disable ) : void

Enable or disable the instructional buttons.

Draw ( ) : void

Draw the menu and all of it's components.

DrawBanner ( Rage g ) : void

Draw your custom banner.

To prevent flickering call it inside a Game.RawFrameRender event handler.

GetSafezoneBounds ( ) : Point

Returns the safezone bounds in pixel, relative to the 1080pixel based system.

GetScreenResolutionMantainRatio ( ) : SizeF

Returns the 1080pixels-based screen resolution while mantaining current aspect ratio.

GoBack ( ) : void

Close or go back in a menu chain.

GoDown ( ) : void

Go up the menu if the number of items is less than or equal to the maximum items on screen.

GoDownOverflow ( ) : void

Go down the menu if the number of items is more than maximum items on screen.

GoLeft ( ) : void

Go left on a MenuListItem.

GoRight ( ) : void

Go right on a MenuListItem.

GoUp ( ) : void

Go up the menu if the number of items is less than or equal to the maximum items on screen.

GoUpOverflow ( ) : void

Go up the menu if the number of items is more than maximum items on screen.

HasControlJustBeenPressed ( Common control, Keys key = Keys.None ) : bool

Check whether a menucontrol has been pressed.

HasControlJustBeenReleaseed ( Common control, Keys key = Keys.None ) : bool

Check whether a menucontrol has been released.

IsControlBeingPressed ( Common control, Keys key = Keys.None ) : bool

Checks whether a menucontrol is being pressed and if selected item is UIListItem, uses UIListItem variables

IsMouseInBounds ( Point topLeft, Size boxSize ) : bool

Chech whether the mouse is inside the specified rectangle.

IsMouseInListItemArrows ( UIMenuListItem item, Point topLeft, Point safezone ) : int

Function to get whether the cursor is in an arrow space, or in label of an MenuListItem.

ProcessControl ( Keys key = Keys.None ) : void

Process control-stroke. Call this in the Game.FrameRender event or in a loop.

ProcessKey ( Keys key ) : void

Process keystroke. Call this in the Game.FrameRender event or in a loop.

ProcessMouse ( ) : void

Process the mouse's position and check if it's hovering over any Element. Call this in Game.FrameRender or in a loop.

RefreshIndex ( ) : void

Reset the current selected item to 0. Use this after you add or remove items dynamically.

ReleaseMenuFromItem ( UIMenuItem releaseFrom ) : bool

Remove menu binding from button.

RemoveInstructionalButton ( InstructionalButton button ) : void
RemoveItemAt ( int index ) : void

Remove an item at index n.

Reset ( bool resetLists, bool resetCheckboxes ) : void

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

ResetKey ( Common control ) : void

Remove all controls on a control.

SelectItem ( ) : void

Activate the current selected item.

SetBannerType ( RAGENativeUI.Elements.ResRectangle rectangle ) : void

Set the banner to your own Rectangle.

SetBannerType ( Sprite spriteBanner ) : void

Set the banner to your own Sprite object.

SetBannerType ( Texture texture ) : void

Set the banner to your own custom texture. Set it to null if you want to restore the banner.

SetKey ( Common control, GameControl gtaControl ) : void

Set a Rage.GameControl to control a menu. Can be multiple controls. This applies it to all indexes.

SetKey ( Common control, GameControl gtaControl, int controlIndex ) : void

Set a Rage.GameControl to control a menu only on a specific index.

SetKey ( Common control, Keys keyToSet ) : void

Set a key to control a menu. Can be multiple keys for each control.

SetMenuWidthOffset ( int widthOffset ) : void

Change the menu's width. The width is calculated as DefaultWidth + WidthOffset, so a width offset of 10 would enlarge the menu by 10 pixels.

UIMenu ( string title, string subtitle ) : System

Basic Menu constructor.

UIMenu ( string title, string subtitle, Point offset ) : System

Basic Menu constructor with an offset.

UIMenu ( string title, string subtitle, Point offset, Texture customBanner ) : System

Initialise a menu with a custom texture banner.

UIMenu ( string title, string subtitle, Point offset, string spriteLibrary, string spriteName ) : System

Advanced Menu constructor that allows custom title banner.

UpdateScaleform ( ) : void

Manually update the instructional buttons scaleform.

보호된 메소드들

메소드 설명
CheckboxChange ( RAGENativeUI.Elements.UIMenuCheckboxItem sender, bool Checked ) : void
IndexChange ( int newindex ) : void
ItemSelect ( UIMenuItem selecteditem, int index ) : void
ListChange ( UIMenuListItem sender, int newindex ) : void
MenuChangeEv ( UIMenu newmenu, bool forward ) : void
MenuCloseEv ( ) : void

비공개 메소드들

메소드 설명
DrawBanner ( GraphicsEventArgs e ) : void
EnableCameraMovement ( ) : void
FormatDescription ( string input ) : string

Formats the input string so it doesn't go out of bounds of the description box.

RecaulculateDescriptionPosition ( ) : void

메소드 상세

AddInstructionalButton() 공개 메소드

public AddInstructionalButton ( InstructionalButton button ) : void
button InstructionalButton
리턴 void

AddItem() 공개 메소드

Add an item to the menu.
public AddItem ( UIMenuItem item ) : void
item RAGENativeUI.Elements.UIMenuItem Item object to be added. Can be normal item, checkbox or list item.
리턴 void

BindMenuToItem() 공개 메소드

Bind a menu to a button. When the button is clicked that menu will open.
public BindMenuToItem ( UIMenu menuToBind, UIMenuItem itemToBindTo ) : void
menuToBind UIMenu
itemToBindTo RAGENativeUI.Elements.UIMenuItem
리턴 void

CheckboxChange() 보호된 메소드

protected CheckboxChange ( RAGENativeUI.Elements.UIMenuCheckboxItem sender, bool Checked ) : void
sender RAGENativeUI.Elements.UIMenuCheckboxItem
Checked bool
리턴 void

Clear() 공개 메소드

Remove all items from the menu.
public Clear ( ) : void
리턴 void

DisEnableControls() 공개 정적인 메소드

Enable or disable all controls but the necessary to operate a menu.
public static DisEnableControls ( bool enable ) : void
enable bool
리턴 void

DisableInstructionalButtons() 공개 메소드

Enable or disable the instructional buttons.
public DisableInstructionalButtons ( bool disable ) : void
disable bool
리턴 void

Draw() 공개 메소드

Draw the menu and all of it's components.
public Draw ( ) : void
리턴 void

DrawBanner() 공개 메소드

Draw your custom banner.

To prevent flickering call it inside a Game.RawFrameRender event handler.

public DrawBanner ( Rage g ) : void
g Rage The to draw on.
리턴 void

GetSafezoneBounds() 공개 정적인 메소드

Returns the safezone bounds in pixel, relative to the 1080pixel based system.
public static GetSafezoneBounds ( ) : Point
리턴 Point

GetScreenResolutionMantainRatio() 공개 정적인 메소드

Returns the 1080pixels-based screen resolution while mantaining current aspect ratio.
public static GetScreenResolutionMantainRatio ( ) : SizeF
리턴 System.Drawing.SizeF

GoBack() 공개 메소드

Close or go back in a menu chain.
public GoBack ( ) : void
리턴 void

GoDown() 공개 메소드

Go up the menu if the number of items is less than or equal to the maximum items on screen.
public GoDown ( ) : void
리턴 void

GoDownOverflow() 공개 메소드

Go down the menu if the number of items is more than maximum items on screen.
public GoDownOverflow ( ) : void
리턴 void

GoLeft() 공개 메소드

Go left on a MenuListItem.
public GoLeft ( ) : void
리턴 void

GoRight() 공개 메소드

Go right on a MenuListItem.
public GoRight ( ) : void
리턴 void

GoUp() 공개 메소드

Go up the menu if the number of items is less than or equal to the maximum items on screen.
public GoUp ( ) : void
리턴 void

GoUpOverflow() 공개 메소드

Go up the menu if the number of items is more than maximum items on screen.
public GoUpOverflow ( ) : void
리턴 void

HasControlJustBeenPressed() 공개 메소드

Check whether a menucontrol has been pressed.
public HasControlJustBeenPressed ( Common control, Keys key = Keys.None ) : bool
control Common Control to check for.
key Keys Key if you're using keys.
리턴 bool

HasControlJustBeenReleaseed() 공개 메소드

Check whether a menucontrol has been released.
public HasControlJustBeenReleaseed ( Common control, Keys key = Keys.None ) : bool
control Common Control to check for.
key Keys Key if you're using keys.
리턴 bool

IndexChange() 보호된 메소드

protected IndexChange ( int newindex ) : void
newindex int
리턴 void

IsControlBeingPressed() 공개 메소드

Checks whether a menucontrol is being pressed and if selected item is UIListItem, uses UIListItem variables
public IsControlBeingPressed ( Common control, Keys key = Keys.None ) : bool
control Common
key Keys
리턴 bool

IsMouseInBounds() 공개 정적인 메소드

Chech whether the mouse is inside the specified rectangle.
public static IsMouseInBounds ( Point topLeft, Size boxSize ) : bool
topLeft Point top left point of your rectangle.
boxSize System.Drawing.Size size of your rectangle.
리턴 bool

IsMouseInListItemArrows() 공개 메소드

Function to get whether the cursor is in an arrow space, or in label of an MenuListItem.
public IsMouseInListItemArrows ( UIMenuListItem item, Point topLeft, Point safezone ) : int
item RAGENativeUI.Elements.UIMenuListItem What item to check
topLeft Point top left point of the item.
safezone Point safezone size.
리턴 int

ItemSelect() 보호된 메소드

protected ItemSelect ( UIMenuItem selecteditem, int index ) : void
selecteditem RAGENativeUI.Elements.UIMenuItem
index int
리턴 void

ListChange() 보호된 메소드

protected ListChange ( UIMenuListItem sender, int newindex ) : void
sender RAGENativeUI.Elements.UIMenuListItem
newindex int
리턴 void

MenuChangeEv() 보호된 메소드

protected MenuChangeEv ( UIMenu newmenu, bool forward ) : void
newmenu UIMenu
forward bool
리턴 void

MenuCloseEv() 보호된 메소드

protected MenuCloseEv ( ) : void
리턴 void

ProcessControl() 공개 메소드

Process control-stroke. Call this in the Game.FrameRender event or in a loop.
public ProcessControl ( Keys key = Keys.None ) : void
key Keys
리턴 void

ProcessKey() 공개 메소드

Process keystroke. Call this in the Game.FrameRender event or in a loop.
public ProcessKey ( Keys key ) : void
key Keys
리턴 void

ProcessMouse() 공개 메소드

Process the mouse's position and check if it's hovering over any Element. Call this in Game.FrameRender or in a loop.
public ProcessMouse ( ) : void
리턴 void

RefreshIndex() 공개 메소드

Reset the current selected item to 0. Use this after you add or remove items dynamically.
public RefreshIndex ( ) : void
리턴 void

ReleaseMenuFromItem() 공개 메소드

Remove menu binding from button.
public ReleaseMenuFromItem ( UIMenuItem releaseFrom ) : bool
releaseFrom RAGENativeUI.Elements.UIMenuItem Button to release from.
리턴 bool

RemoveInstructionalButton() 공개 메소드

public RemoveInstructionalButton ( InstructionalButton button ) : void
button InstructionalButton
리턴 void

RemoveItemAt() 공개 메소드

Remove an item at index n.
public RemoveItemAt ( int index ) : void
index int Index to remove the item at.
리턴 void

Reset() 공개 메소드

Sets the index of all lists to 0 and unchecks all the checkboxes.
public Reset ( 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.
리턴 void

ResetKey() 공개 메소드

Remove all controls on a control.
public ResetKey ( Common control ) : void
control Common
리턴 void

SelectItem() 공개 메소드

Activate the current selected item.
public SelectItem ( ) : void
리턴 void

SetBannerType() 공개 메소드

Set the banner to your own Rectangle.
public SetBannerType ( RAGENativeUI.Elements.ResRectangle rectangle ) : void
rectangle RAGENativeUI.Elements.ResRectangle UIResRectangle object. Position and size does not matter.
리턴 void

SetBannerType() 공개 메소드

Set the banner to your own Sprite object.
public SetBannerType ( Sprite spriteBanner ) : void
spriteBanner RAGENativeUI.Elements.Sprite Sprite object. The position and size does not matter.
리턴 void

SetBannerType() 공개 메소드

Set the banner to your own custom texture. Set it to null if you want to restore the banner.
public SetBannerType ( Texture texture ) : void
texture Texture Rage.Texture object
리턴 void

SetKey() 공개 메소드

Set a Rage.GameControl to control a menu. Can be multiple controls. This applies it to all indexes.
public SetKey ( Common control, GameControl gtaControl ) : void
control Common
gtaControl GameControl
리턴 void

SetKey() 공개 메소드

Set a Rage.GameControl to control a menu only on a specific index.
public SetKey ( Common control, GameControl gtaControl, int controlIndex ) : void
control Common
gtaControl GameControl
controlIndex int
리턴 void

SetKey() 공개 메소드

Set a key to control a menu. Can be multiple keys for each control.
public SetKey ( Common control, Keys keyToSet ) : void
control Common
keyToSet Keys
리턴 void

SetMenuWidthOffset() 공개 메소드

Change the menu's width. The width is calculated as DefaultWidth + WidthOffset, so a width offset of 10 would enlarge the menu by 10 pixels.
public SetMenuWidthOffset ( int widthOffset ) : void
widthOffset int New width offset.
리턴 void

UIMenu() 공개 메소드

Basic Menu constructor.
public UIMenu ( string title, string subtitle ) : System
title string Title that appears on the big banner.
subtitle string Subtitle that appears in capital letters in a small black bar.
리턴 System

UIMenu() 공개 메소드

Basic Menu constructor with an offset.
public UIMenu ( string title, string subtitle, Point offset ) : System
title string Title that appears on the big banner.
subtitle string Subtitle that appears in capital letters in a small black bar. Set to "" if you dont want a subtitle.
offset Point Point object with X and Y data for offsets. Applied to all menu elements.
리턴 System

UIMenu() 공개 메소드

Initialise a menu with a custom texture banner.
public UIMenu ( string title, string subtitle, Point offset, Texture customBanner ) : System
title string Title that appears on the big banner. Set to "" if you don't want a title.
subtitle string Subtitle that appears in capital letters in a small black bar. Set to "" if you dont want a subtitle.
offset Point Point object with X and Y data for offsets. Applied to all menu elements.
customBanner Texture Your custom Rage.Texture.
리턴 System

UIMenu() 공개 메소드

Advanced Menu constructor that allows custom title banner.
public UIMenu ( string title, string subtitle, Point offset, string spriteLibrary, string spriteName ) : System
title string Title that appears on the big banner. Set to "" if you are using a custom banner.
subtitle string Subtitle that appears in capital letters in a small black bar.
offset Point Point object with X and Y data for offsets. Applied to all menu elements.
spriteLibrary string Sprite library name for the banner.
spriteName string Sprite name for the banner.
리턴 System

UpdateScaleform() 공개 메소드

Manually update the instructional buttons scaleform.
public UpdateScaleform ( ) : void
리턴 void

프로퍼티 상세

AUDIO_BACK 공개적으로 프로퍼티

public string AUDIO_BACK
리턴 string

AUDIO_ERROR 공개적으로 프로퍼티

public string AUDIO_ERROR
리턴 string

AUDIO_LEFTRIGHT 공개적으로 프로퍼티

public string AUDIO_LEFTRIGHT
리턴 string

AUDIO_LIBRARY 공개적으로 프로퍼티

public string AUDIO_LIBRARY
리턴 string

AUDIO_SELECT 공개적으로 프로퍼티

public string AUDIO_SELECT
리턴 string

AUDIO_UPDOWN 공개적으로 프로퍼티

public string AUDIO_UPDOWN
리턴 string

AllowCameraMovement 공개적으로 프로퍼티

public bool AllowCameraMovement
리턴 bool

ControlDisablingEnabled 공개적으로 프로퍼티

public bool ControlDisablingEnabled
리턴 bool

FormatDescriptions 공개적으로 프로퍼티

public bool FormatDescriptions
리턴 bool

HoldTimeBeforeScroll 공개적으로 프로퍼티

public uint HoldTimeBeforeScroll
리턴 uint

MenuItems 공개적으로 프로퍼티

public List MenuItems
리턴 List

MouseControlsEnabled 공개적으로 프로퍼티

public bool MouseControlsEnabled
리턴 bool

MouseEdgeEnabled 공개적으로 프로퍼티

public bool MouseEdgeEnabled
리턴 bool

ResetCursorOnOpen 공개적으로 프로퍼티

public bool ResetCursorOnOpen
리턴 bool