C# 클래스 UIScrollList, urban-survivors

상속: MonoBehaviour, IUIObject
파일 보기 프로젝트 열기: exdev/urban-survivors 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
activateWhenAdding bool
alignment ALIGNMENT
clipContents bool
clipWhenMoving bool
direction DIRECTION
dragThreshold float
itemSpacing float
manager SpriteManager,
methodToInvokeOnSelect string
orientation ORIENTATION
prefabItems PrefabListItem[],
sceneItems GameObject[]
scriptWithMethodToInvoke MonoBehaviour
slider UISlider,
spacingAtEnds bool
touchScroll bool
viewableArea Vector2

보호된 프로퍼티들

프로퍼티 타입 설명
cachedPos Vector3
cachedRot Quaternion
cachedScale Vector3
changeDelegate EZValueChangedDelegate
clientClippingRect Rect3D
container IUIContainer
contentExtents float
inputDelegate EZInputDelegate
isScrolling bool
items List
m_controlIsEnabled bool
m_started bool
mover GameObject
noTouch bool
scrollMax float
scrollPos float
selectedItem IUIListObject
tempVisItems List
visibleItems List

공개 메소드들

메소드 설명
AddInputDelegate ( EZInputDelegate del ) : void
AddItem ( GameObject itemGO ) : void

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

AddItem ( IUIListObject item ) : void

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

AddItem ( IUIListObject item, string text ) : void

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

AddValueChangedDelegate ( EZValueChangedDelegate del ) : void
Awake ( ) : void
ClearList ( bool destroy ) : void

Empties the contents of the list entirely. Destroys the items if instructed, otherwise it just deactivates them.

Create ( string name, Vector3 pos ) : UIScrollList,

Creates a GameObject and attaches this component type to it.

Create ( string name, Vector3 pos, Quaternion rotation ) : UIScrollList,

Creates a GameObject and attaches this component type to it.

CreateItem ( GameObject prefab ) : IUIListObject

Instantiates a new list item based on the prefab to clone, adds it to the end of the list and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

CreateItem ( GameObject prefab, int position ) : IUIListObject

Instantiates a new list item based on the prefab to clone, adds it to the list at the position specified by "position" and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

CreateItem ( GameObject prefab, int position, string text ) : IUIListObject

Instantiates a new list item based on the prefab to clone, adds it to the list at the position specified by "position" and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

CreateItem ( GameObject prefab, string text ) : IUIListObject

Instantiates a new list item based on the prefab to clone, adds it to the end of the list and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.

DidClick ( IUIListObject item ) : void
DidSelect ( IUIListObject item ) : void
GetItem ( int index ) : IUIListObject

Returns a reference to the specified list item.

GotFocus ( ) : bool
InsertItem ( IUIListObject item, int position ) : void

Inserts a list item at the specified position in the list.

InsertItem ( IUIListObject item, int position, string text ) : void

Inserts a list item at the specified position in the list.

ListDragged ( POINTER_INFO, ptr ) : void
OnDrawGizmosSelected ( ) : void
OnEnable ( ) : void
OnInput ( POINTER_INFO, ptr ) : void
PointerReleased ( ) : void
PositionItems ( ) : void

Positions list items according to the current scroll position.

RemoveInputDelegate ( EZInputDelegate del ) : void
RemoveItem ( IUIListObject item, bool destroy ) : void

Removes the specified item. Remaining items are repositioned to fill the gap. The removed item is destroyed if 'destroy' is true. Otherwise, it is deactivated.

RemoveItem ( int index, bool destroy ) : void

Removes the item at the specified index. Remaining items are repositioned to fill the gap. The removed item is destroyed if 'destroy' is true. Otherwise, it is deactivated.

RemoveValueChangedDelegate ( EZValueChangedDelegate del ) : void
RepositionItems ( ) : void

Repositions list items according to the current scroll position, and adjusts for any change in the items' extents.

RequestContainership ( IUIContainer cont ) : bool
ScrollListTo ( float pos ) : void

Scrolls the list directly to the position indicated (0-1).

SetInputDelegate ( EZInputDelegate del ) : void
SetSelectedItem ( int index ) : void

Sets the item at the specified index as the currently selected item.

SetValueChangedDelegate ( EZValueChangedDelegate del ) : void
SliderMoved ( IUIObject slider ) : void
Start ( ) : void
Update ( ) : void

보호된 메소드들

메소드 설명
AddItemsToContainer ( ) : void
CalcClippingRect ( ) : void
ClipItems ( ) : void
PositionHorizontally ( bool updateExtents ) : void
PositionVertically ( bool updateExtents ) : void
RemoveItemsFromContainer ( ) : void
ScrollListTo_Internal ( float pos ) : void
UpdateContentExtents ( float change ) : void

메소드 상세

AddInputDelegate() 공개 메소드

public AddInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
리턴 void

AddItem() 공개 메소드

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public AddItem ( GameObject itemGO ) : void
itemGO GameObject
리턴 void

AddItem() 공개 메소드

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public AddItem ( IUIListObject item ) : void
item IUIListObject Reference to the list item to be added.
리턴 void

AddItem() 공개 메소드

Adds an item to the end of the list. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public AddItem ( IUIListObject item, string text ) : void
item IUIListObject Reference to the list item to be added.
text string Text to display in the item (requires that the item has a TextMesh associated with it, preferably in a child GameObject).
리턴 void

AddItemsToContainer() 보호된 메소드

protected AddItemsToContainer ( ) : void
리턴 void

AddValueChangedDelegate() 공개 메소드

public AddValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
리턴 void

Awake() 공개 메소드

public Awake ( ) : void
리턴 void

CalcClippingRect() 보호된 메소드

protected CalcClippingRect ( ) : void
리턴 void

ClearList() 공개 메소드

Empties the contents of the list entirely. Destroys the items if instructed, otherwise it just deactivates them.
public ClearList ( bool destroy ) : void
destroy bool When true, the list items are actually destroyed. Otherwise, they are deactivated.
리턴 void

ClipItems() 보호된 메소드

protected ClipItems ( ) : void
리턴 void

Create() 정적인 공개 메소드

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : UIScrollList,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
리턴 UIScrollList,

Create() 정적인 공개 메소드

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : UIScrollList,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
rotation Quaternion Rotation of the object.
리턴 UIScrollList,

CreateItem() 공개 메소드

Instantiates a new list item based on the prefab to clone, adds it to the end of the list and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public CreateItem ( GameObject prefab ) : IUIListObject
prefab GameObject GameObject/Prefab which is to be instantiated and added to the end of the list.
리턴 IUIListObject

CreateItem() 공개 메소드

Instantiates a new list item based on the prefab to clone, adds it to the list at the position specified by "position" and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public CreateItem ( GameObject prefab, int position ) : IUIListObject
prefab GameObject GameObject/Prefab which is to be instantiated and added to the end of the list.
position int 0-based index where the new item will be placed in the list.
리턴 IUIListObject

CreateItem() 공개 메소드

Instantiates a new list item based on the prefab to clone, adds it to the list at the position specified by "position" and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public CreateItem ( GameObject prefab, int position, string text ) : IUIListObject
prefab GameObject GameObject/Prefab which is to be instantiated and added to the end of the list.
position int 0-based index where the new item will be placed in the list.
text string Text to display in the item (requires that the item has a TextMesh associated with it, preferably in a child GameObject).
리턴 IUIListObject

CreateItem() 공개 메소드

Instantiates a new list item based on the prefab to clone, adds it to the end of the list and returns a reference to it. NOTE: The prefab/GameObject is required to have a component that implements IUIListObject. NOTE: For proper appearance, list items should each be of uniform width when the list is vertical, and of uniform height when the list is horizontal. Besides that, list items can vary in size.
public CreateItem ( GameObject prefab, string text ) : IUIListObject
prefab GameObject GameObject/Prefab which is to be instantiated and added to the end of the list.
text string Text to display in the item (requires that the item has a TextMesh associated with it, preferably in a child GameObject).
리턴 IUIListObject

DidClick() 공개 메소드

public DidClick ( IUIListObject item ) : void
item IUIListObject
리턴 void

DidSelect() 공개 메소드

public DidSelect ( IUIListObject item ) : void
item IUIListObject
리턴 void

GetItem() 공개 메소드

Returns a reference to the specified list item.
public GetItem ( int index ) : IUIListObject
index int Index of the item to retrieve.
리턴 IUIListObject

GotFocus() 공개 메소드

public GotFocus ( ) : bool
리턴 bool

InsertItem() 공개 메소드

Inserts a list item at the specified position in the list.
public InsertItem ( IUIListObject item, int position ) : void
item IUIListObject Reference to the item to be inserted into the list.
position int 0-based index of the position in the list where the item will be placed.
리턴 void

InsertItem() 공개 메소드

Inserts a list item at the specified position in the list.
public InsertItem ( IUIListObject item, int position, string text ) : void
item IUIListObject Reference to the item to be inserted into the list.
position int 0-based index of the position in the list where the item will be placed.
text string Text to display in the item (requires that the item has a TextMesh associated with it, preferably in a child GameObject).
리턴 void

ListDragged() 공개 메소드

public ListDragged ( POINTER_INFO, ptr ) : void
ptr POINTER_INFO,
리턴 void

OnDrawGizmosSelected() 공개 메소드

public OnDrawGizmosSelected ( ) : void
리턴 void

OnEnable() 공개 메소드

public OnEnable ( ) : void
리턴 void

OnInput() 공개 메소드

public OnInput ( POINTER_INFO, ptr ) : void
ptr POINTER_INFO,
리턴 void

PointerReleased() 공개 메소드

public PointerReleased ( ) : void
리턴 void

PositionHorizontally() 보호된 메소드

protected PositionHorizontally ( bool updateExtents ) : void
updateExtents bool
리턴 void

PositionItems() 공개 메소드

Positions list items according to the current scroll position.
public PositionItems ( ) : void
리턴 void

PositionVertically() 보호된 메소드

protected PositionVertically ( bool updateExtents ) : void
updateExtents bool
리턴 void

RemoveInputDelegate() 공개 메소드

public RemoveInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
리턴 void

RemoveItem() 공개 메소드

Removes the specified item. Remaining items are repositioned to fill the gap. The removed item is destroyed if 'destroy' is true. Otherwise, it is deactivated.
public RemoveItem ( IUIListObject item, bool destroy ) : void
item IUIListObject
destroy bool
리턴 void

RemoveItem() 공개 메소드

Removes the item at the specified index. Remaining items are repositioned to fill the gap. The removed item is destroyed if 'destroy' is true. Otherwise, it is deactivated.
public RemoveItem ( int index, bool destroy ) : void
index int Index of the item to remove.
destroy bool
리턴 void

RemoveItemsFromContainer() 보호된 메소드

protected RemoveItemsFromContainer ( ) : void
리턴 void

RemoveValueChangedDelegate() 공개 메소드

public RemoveValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
리턴 void

RepositionItems() 공개 메소드

Repositions list items according to the current scroll position, and adjusts for any change in the items' extents.
public RepositionItems ( ) : void
리턴 void

RequestContainership() 공개 메소드

public RequestContainership ( IUIContainer cont ) : bool
cont IUIContainer
리턴 bool

ScrollListTo() 공개 메소드

Scrolls the list directly to the position indicated (0-1).
public ScrollListTo ( float pos ) : void
pos float Position of the list - 0-1 (0 == beginning, 1 == end)
리턴 void

ScrollListTo_Internal() 보호된 메소드

protected ScrollListTo_Internal ( float pos ) : void
pos float
리턴 void

SetInputDelegate() 공개 메소드

public SetInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
리턴 void

SetSelectedItem() 공개 메소드

Sets the item at the specified index as the currently selected item.
public SetSelectedItem ( int index ) : void
index int The zero-based index of the item.
리턴 void

SetValueChangedDelegate() 공개 메소드

public SetValueChangedDelegate ( EZValueChangedDelegate del ) : void
del EZValueChangedDelegate
리턴 void

SliderMoved() 공개 메소드

public SliderMoved ( IUIObject slider ) : void
slider IUIObject
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Update() 공개 메소드

public Update ( ) : void
리턴 void

UpdateContentExtents() 보호된 메소드

protected UpdateContentExtents ( float change ) : void
change float
리턴 void

프로퍼티 상세

activateWhenAdding 공개적으로 프로퍼티

When true, items added or inserted to this list will be activated recursively. This is STRONGLY recommended when using managed sprites/controls.
public bool activateWhenAdding
리턴 bool

alignment 공개적으로 프로퍼티

Determines how the items will be aligned in the list when added. See UIScrollList.ALIGNMENT [ALIGNMENT]
public ALIGNMENT alignment
리턴 ALIGNMENT

cachedPos 보호되어 있는 프로퍼티

protected Vector3 cachedPos
리턴 Vector3

cachedRot 보호되어 있는 프로퍼티

protected Quaternion cachedRot
리턴 Quaternion

cachedScale 보호되어 있는 프로퍼티

protected Vector3 cachedScale
리턴 Vector3

changeDelegate 보호되어 있는 프로퍼티

protected EZValueChangedDelegate changeDelegate
리턴 EZValueChangedDelegate

clientClippingRect 보호되어 있는 프로퍼티

protected Rect3D clientClippingRect
리턴 Rect3D

clipContents 공개적으로 프로퍼티

When true, the contents of the list will be clipped to the viewable area. Otherwise, the content will extend beyond the specified viewable area.
public bool clipContents
리턴 bool

clipWhenMoving 공개적으로 프로퍼티

When true, items will be clipped each frame in which it is detected that the list has moved, rotated, or scaled. Use this if you are having clipping errors after scaling, rotating, etc, a list as part of a panel transition, etc. Leave set to false otherwise to improve performance.
public bool clipWhenMoving
리턴 bool

container 보호되어 있는 프로퍼티

protected IUIContainer container
리턴 IUIContainer

contentExtents 보호되어 있는 프로퍼티

protected float contentExtents
리턴 float

direction 공개적으로 프로퍼티

Determines whether items will be added to the list from top-to-bottom and left-to-right, or from bottom-to-top and right-to-left. See UIScrollList.DIRECTION [DIRECTION]
public DIRECTION direction
리턴 DIRECTION

dragThreshold 공개적으로 프로퍼티

Distance the pointer must travel beyond which when it is released, the item under the pointer will not be considered to have been selected. This allows touch scrolling without inadvertently selecting the item under the pointer.
public float dragThreshold
리턴 float

inputDelegate 보호되어 있는 프로퍼티

protected EZInputDelegate inputDelegate
리턴 EZInputDelegate

isScrolling 보호되어 있는 프로퍼티

protected bool isScrolling
리턴 bool

itemSpacing 공개적으로 프로퍼티

Empty space to put between each list item.
public float itemSpacing
리턴 float

items 보호되어 있는 프로퍼티

protected List items
리턴 List

m_controlIsEnabled 보호되어 있는 프로퍼티

protected bool m_controlIsEnabled
리턴 bool

m_started 보호되어 있는 프로퍼티

protected bool m_started
리턴 bool

manager 공개적으로 프로퍼티

(Optional) Manager to which instantiated list items should be added once created. If none is set, sprites must either be unmanaged, or must already have been added to a manager.
public SpriteManager, manager
리턴 SpriteManager,

methodToInvokeOnSelect 공개적으로 프로퍼티

A string containing the name of the method to be invoked when an item is selected.
public string methodToInvokeOnSelect
리턴 string

mover 보호되어 있는 프로퍼티

protected GameObject mover
리턴 GameObject

noTouch 보호되어 있는 프로퍼티

protected bool noTouch
리턴 bool

orientation 공개적으로 프로퍼티

The orientation of the list - horizontal or vertical.
public ORIENTATION orientation
리턴 ORIENTATION

prefabItems 공개적으로 프로퍼티

Optional array of item prefabs that are to be added to the list on startup. These will be added after the items in the sceneItems array.
public PrefabListItem[], prefabItems
리턴 PrefabListItem[],

sceneItems 공개적으로 프로퍼티

Optional array of items in the scene that are to be added to the list on startup. These will be added before the items in the prefabItems array.
public GameObject[] sceneItems
리턴 GameObject[]

scriptWithMethodToInvoke 공개적으로 프로퍼티

Reference to the script component with the method you wish to invoke when an item is selected.
public MonoBehaviour scriptWithMethodToInvoke
리턴 MonoBehaviour

scrollMax 보호되어 있는 프로퍼티

protected float scrollMax
리턴 float

scrollPos 보호되어 있는 프로퍼티

protected float scrollPos
리턴 float

selectedItem 보호되어 있는 프로퍼티

protected IUIListObject selectedItem
리턴 IUIListObject

slider 공개적으로 프로퍼티

An optional slider control that will control the scroll position of the list.
public UISlider, slider
리턴 UISlider,

spacingAtEnds 공개적으로 프로퍼티

When set to true, the itemSpacing value will be applied before the first item, and after the last so as to "pad" the first and last items a bit from the edge. If false, the first and last items will be flush with the edges of the viewable area.
public bool spacingAtEnds
리턴 bool

tempVisItems 보호되어 있는 프로퍼티

protected List tempVisItems
리턴 List

touchScroll 공개적으로 프로퍼티

When true, scrolling will operate like a scrollable list on an iPhone - when a pointing device (normally a finger) is dragged across it, it scrolls and coasts to an eventual stop if not stopped manually.
public bool touchScroll
리턴 bool

viewableArea 공개적으로 프로퍼티

The extents of the viewable area, in local space units. The contents of the list will be clipped to this area. Ex: If an area of 10x10 is specified, the list contents will be clipped 5 units above the center of the scroll list's GameObject, 5 units below, and 5 units on either side.
public Vector2 viewableArea
리턴 Vector2

visibleItems 보호되어 있는 프로퍼티

protected List visibleItems
리턴 List