Controller Class |
Namespace: FairyGUI
public class Controller : EventDispatcher
The Controller type exposes the following members.
| Name | Description | |
|---|---|---|
| Controller | Initializes a new instance of the Controller class |
| Name | Description | |
|---|---|---|
| onChanged |
When controller page changed.
当控制器活动页面改变时,此事件被触发。
| |
| pageCount |
Page count of this controller.
获得页面数量。
| |
| previousPage |
Previous page name.
获得上次活动页面名称。
| |
| previsousIndex |
Previouse page index.
获得上次活动页面索引
| |
| selectedIndex |
Current page index.
获得或设置当前活动页面索引。
| |
| selectedPage |
Current page name.
获得当前活动页面名称
|
| Name | Description | |
|---|---|---|
| AddEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
| AddEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
| AddPage |
Add a new page to this controller.
| |
| AddPageAt |
Add a new page to this controller at a certain index.
| |
| BroadcastEvent | (Inherited from EventDispatcher.) | |
| BubbleEvent | (Inherited from EventDispatcher.) | |
| ClearPages |
Remove all pages.
| |
| DispatchEvent(String) | (Inherited from EventDispatcher.) | |
| DispatchEvent(EventContext) | (Inherited from EventDispatcher.) | |
| DispatchEvent(String, Object) | (Inherited from EventDispatcher.) | |
| DispatchEvent(String, Object, Object) | (Inherited from EventDispatcher.) | |
| Dispose | Releases all resources used by the Controller | |
| GetPageIdByName |
Get page id by name
| |
| GetPageName |
Get page name by an index.
通过页面索引获得页面名称。
| |
| HasPage |
Check if the controller has a page.
| |
| RemoveEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
| RemoveEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
| RemoveEventListeners | (Inherited from EventDispatcher.) | |
| RemoveEventListeners(String) | (Inherited from EventDispatcher.) | |
| RemovePage |
Remove a page.
| |
| RemovePageAt |
Removes a page at a certain index.
| |
| RunActions | ||
| SetSelectedIndex |
Set current page index, no onChanged event.
通过索引设置当前活动页面,和selectedIndex的区别在于,这个方法不会触发onChanged事件。
| |
| SetSelectedPage |
Set current page by name, no onChanged event.
通过页面名称设置当前活动页面,和selectedPage的区别在于,这个方法不会触发onChanged事件。
| |
| Setup |