2017年3月19日 星期日

iMenu - Intelligent Menu for uGUI Tutorial

iMenu Tutorial


Welcome to the iMenu tutorial.
You will feel the convenience of creating a menu.

Video



More..

API


FocusGradientScale

FocusGradientScale


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

Description

Let the players know the gradient scaling components of the current focus button.

Variables


delta The amount of the scaling of a decrement (or power down) by one unit per distance to the focus button.

focus The scale when the button is focused.

target To change scale of the Transform.

Inherited members


Variables


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

gradientType Type of Gradient.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.

FocusPosition

FocusPosition


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

Description

Let the players know the position of the current focus button to change the component.

Variables


focusOffset The position offset when the target position is in the focus state.

target To change the target transform of the position offset.

Inherited members


Variables


curve Focus on the lerp curve.

defocusAfterFocusing Defocused immediately after focusing.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

CursorTranslate

CursorTranslate


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

Description

Let the players know the cursor components of the current focus button.

Variables



ignoreTimeScale Whether to ignore the time scale.

speed The speed of the cursor movement.


Inherited members



Public Functions


Hide Hide the cursor.

Show Show the cursors.

FocusScale

FocusScale


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

Description

Let the players know the scale of the current focus button to change the component.

Variables


focus The scale when the target is focused.

normal The scale when the target is in the normal state.

target To change the target transform of the scale.

Inherited members


Variables


curve Focus on the lerp curve.

defocusAfterFocusing Defocused immediately after focusing.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

FocusRotation

FocusRotation


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

Description

Let the players know the rotation of the current focus button changes the component.

Variables


focus Rotation when the target is in focus.

normal Rotation of the target in the normal state.

target To change the target transform of the rotation.


Inherited members


Variables


curve Focus on the lerp curve.

defocusAfterFocusing Defocused immediately after focusing.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

FocusGradientAlpha

FocusGradientAlpha


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

Description

Let the players know the gradient alpha components of the current focus button.

Variables


delta The amount of the alpha of a decrement (or power down) by one unit per distance to the focus button.

focus The alpha when the button is focused.

includeChildren Whether it contains all sub-objects.

target To change alpha of the MaskableGraphic.

Inherited members


Variables


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

gradientType Type of Gradient.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

FocusAlpha

FocusAlpha


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

Description

Let the players know the alpha of the current focus button to change the component.

Variables


normal The alpha of the target in the normal state.

disable The alpha of the target when it is not enable.

disableFocus The alpha of the target when it is not enable and its in the focus state.

focus The alpha of the target in the focus state.

includeChildren Whether it contains all sub-objects.

normal The alpha of the target in the normal state.

target To change alpha of the MaskableGraphic.

Inherited members


Variables


curve Focus on the lerp curve.

defocusAfterFocusing Defocused immediately after focusing.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.

FocusColor

FocusColor


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

Description

Let the players know the color of the current focus button to change the component.

Variables


normal The color of the target in the normal state.

disable The color of the target when it is not enable.

disableFocus The color of the target when it is not enable and its in the focus state.

focus The color of the target in the focus state.

includeChildren Whether it contains all sub-objects.

normal The color of the target in the normal state.

target To change color of the MaskableGraphic.

Inherited members


Variables


curve Focus on the lerp curve.

defocusAfterFocusing Defocused immediately after focusing.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

FocusCursor

FocusCursor


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

Description

Let the player know the specified cursor element of the current focus button.

Variables


focusTransform Used to describe the position, rotation, and scale of the cursor when its focused.

cursor The cursor is driven when focusing.

Inherited members


Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

FocusSprite

FocusSprite


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

Description

Let the players know the picture of the current focus button to change the component.

Variables


disable The sprite is displayed when the target is not enabled.

disableFocus The sprite is displayed when the target is not enabled and the focus is on.

focus The sprite is displayed when the target is in focus state.

normal The sprite is displayed when the target is in the normal state.

target To change the sprite's target image.



Inherited members


Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

IFocusTweenTransform

IFocusTweenTransform


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

Description



Variables


defocusAfterFocusing Defocused immediately after focusing.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Inherited members


Variables


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

IFocusTweenGradient

IFocusTweenGradient


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

Description

The abstract class is graded according to the distance from the focus button.

Variables


gradientType Type of Gradient.

Inherited members


Variables


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

IFocusTweenEach

IFocusTweenEach


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

Description

An abstract class that fades according to various focus states.

Variables


defocusAfterFocusing Defocused immediately after focusing.

refocus Whether to re-focus the effect. When the button is already in focus, whether to re-focus effect while clicking.

Inherited members


Variables


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

IFocusTween

IFocusTween


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

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


curve Focus on the lerp curve.

durationFocus Focus time in seconds.

durationDefocus Defocus time in seconds.

ignoreTimeScale Whether to ignore the time zoom.

onBegin Start focusing and defocusing events.

onFinished Focus and defocus end event.

Inherited members


Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

IFocus

IFocus


class in UnityEngine.UI.iMenu

Description

The abstract class used to display the focus state of the button.

Public Functions


QuickSetStatus Set the focus state. Ignore the tween process.

Recover Revert to the state before focusing.

SetStatus Set the focus state.




Scripting

Cell

Cell


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

Description

The easiest button style. It comes with a text.


Variables



text Text UI of the cell.

Inherited members


Variables



downOptionIndex When this button goes down, it will jump to which index button. It's only useful in customMenu type.

leftOptionIndex When this button goes left, it will jump to which index button. It's only useful in customMenu type.

rightOptionIndex When this button goes right, it will jump to which index button. It's only useful in customMenu type.

upOptionIndex When this button goes up, it will jump to which index button. It's only useful in customMenu type.


Inherited members


Variables



clickParameter Used to distinguish which sub-cell to click on.The main cell is fixed to 0.



Scripting

ICell

ICell


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

Description

The most basic button unit.

If you want to customize the special button appearance, then add a C # script to inherit it!

Variables



downOptionIndex When this button goes down, it will jump to which index button. It's only useful in customMenu type.

leftOptionIndex When this button goes left, it will jump to which index button. It's only useful in customMenu type.

rightOptionIndex When this button goes right, it will jump to which index button. It's only useful in customMenu type.

upOptionIndex When this button goes up, it will jump to which index button. It's only useful in customMenu type.


Inherited members



Variables



clickParameter Used to distinguish which sub-cell to click on.The main cell is fixed to 0.




Scripting

ICursor

ICursor


class in UnityEngine.UI.iMenu

Description

The abstract class of the cursor when focused.


Public Functions


Hide Hide the cursor.

Show Show the cursors.




Scripting

DragRing

DragRing


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

Description

Through the drag to switch the components of the option.


Variables


reversal Whether to reverse the switch.

speedMode Switch the speed mode of options.

switchMode Switch the speed mode of cells.

Inherited members



Variables


target The target element to control.

switchSpeed The speed of switching the options.




Scripting

GamePad

GamePad


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

Description

Through the gamepad operation to switch the components of the options.


Variables


allPressMode When customizing press mode, each key's press mode.

down When the switch mode is a custom button, press which button to switch downwards?

left When the switch mode is a custom button, press which button to switch left?

multiPerson Whether it can be multi-person operation.

operateMode You decide to use only the D-Pad or the Left Stick or both.

playerNumber The specified operator number.

pressMode Defines the menu for it is executed when the button is pressed or when the key is released.

right When the switch mode is a custom button, press which button to switch right?

switchMode You can choose to use the default X, Y axis control, or custom buttons to switch the menu mode.

up When the switch mode is a custom button, press which button to switch upwards?

Inherited members



Variables



curve A curve that describes the change in speed.

listenKeys All the keys to be listened.

speedMode Switch the speed mode of options.

switchSpeed The speed of switching the options.

target The target element to control.




Scripting

IController

IController


class in UnityEngine.UI.iMenu

Description

The basic category of the switching of the control options.


Variables


target The target element to control.

switchSpeed The speed of switching the options.




Scripting

2017年3月18日 星期六

RingMenu

RingMenu


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

Description

If you want the options in a ring then you can use this menu mode to complete.

The system can define any axial tilt to meet the needs of the various special arrangements you want.

Variables


centerOffset This is the offset of the center point of the ring

irradiation Whether the cell is arranged in a radial manner.

isTurningOnChange Whether to turn when the cells are switched.

radius This is the radius of the ring.

rotation Rotate parameters. If you want the menu to be tilted at the specified angle then you can use it.

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 the button that is not enabled is operational.

isFocused Whether the menu is currently focused.

menuMode How the cells to generated.

operaDirection The extending direction of buttons arrangement.

operaing Whether the option function of switch and click  is enable.

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.

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.