2017年3月18日 星期六

RectMenu

RectMenu


class in UnityEngine.UI.iMenu / Inherits from:IMenuNeat

Description

You must have seen the typical menu mode in most games.

When you want to make a rectangular arrangement such as a list of props, this will be your best choice.

Variables


cellAnchor In non-rolling mode, the anchor of the button arrangement.

cellSize The size of each cell when arranging menus.

edgeDistance In the scroll mode, how much distance the focus button is from the edge of the display area.

isScroll Whether is the scroll mode menu.

isHorizontalLoopWhether the horizontal direction is arranged in a loop.

isVerticalLoop Whether the vertical direction is arranged in a loop.

padding In the scrolling mode, the distance between the all button and the edge of the menu.

parallelCount How many cells side by side does allow in the extending direction?

scrollBarDisplay It's in scrolling mode, the display mode of the ScrollBar.


scrollRect In scrolling mode, the buttons are displayed in the scroll area.

Inherited members


Variables


allCells All of the buttons in this menu can be pre-placed in the array, or right click on the menu of inspector by selecting "CollectAllCells" to collect all the buttons under the menu of GameObject.

cellOriginal Used to create the prototype of the button. It's only useful in dynamic creation mode.

clickMode This is cursor and touch click button mode which determines how your buttons are executed.

horizontalCycle The cycle mode for horizontal operation.

isDisableFocus Whether it can be operated when the cell is not enabled.

isFocused Whether the menu is currently focused.

menuMode How the cells to generated.

operaDirection The extending direction of buttons arrangement.

operaing Is the menu operational?

parallelCount How many buttons side by side does allow in the extending direction?

scrollDuration The length of the scrolling process.

verticalCycle The cycle mode for vertical operation.

Public Functions


AddOnChangeOptionListener Listen the menu to toggle options.

AddOnClickListener Listen the menu click operation.

ClearCells Clear all buttons for this menu.

CreateCells Dynamically create all buttons.It's only useful in dynamic creation mode.

Defocus Out of focus, lose focus from all buttons.

GetCurrentIndex The menu currently focuses on the index.

OperaSwitch "Operaing" switch.

IsCellOperable Confirm that the specified button is operational.

RemoveAllOnChangeOptionListener Remove all "when switching options" listener.

RemoveAllOnClickListener Remove all "when clicking options" listener.

RemoveOnChangeOptionListener Remove the "when switching options" listener.

RemoveOnClickListener Remove the "when clicking options" listener.

ResetToFirstOption Reset the option index to the first enabled button position.

SetCellDisplay Button display switch.

SetCellEnable Button to enable the switch.

SetCellContent Set button display content.

SetCellsContent Set all buttons display content.

SetFocus Sets the index to focus on the previous operation.The return value is the focus index value.

沒有留言:

張貼留言