C# 클래스 UIPanel, LoopScorllViewForNGUI

상속: UIRect
파일 보기 프로젝트 열기: tinyantstudio/LoopScorllViewForNGUI 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
alwaysOnScreen bool
anchorOffset bool
cullWhileDragging bool
generateNormals bool
list BetterList
onClipMove OnClippingMoved
onGeometryUpdated OnGeometryUpdated
renderQueue RenderQueue
showInPanelTool bool
startingRenderQueue int
widgetsAreStatic bool

Private Properties

프로퍼티 타입 설명
Awake void
FillAllDrawCalls void
FillDrawCall bool
FindParent void
GetWindowSize Vector2
InvalidateClipping void
LateUpdate void
OnDrawGizmos void
RebuildAllDrawCalls void
UpdateDrawCalls void
UpdateLayers void
UpdateSelf void
UpdateTransformMatrix void
UpdateWidgets void

공개 메소드들

메소드 설명
AddWidget ( UIWidget, w ) : void

Make the following widget be managed by the panel.

Affects ( UIWidget, w ) : bool

Whether the specified widget is going to be affected by this panel in any way.

CalculateConstrainOffset ( Vector2 min, Vector2 max ) : Vector3

Calculate the offset needed to be constrained within the panel's bounds.

CalculateFinalAlpha ( int frameID ) : float

Widget's final alpha, after taking the panel's alpha into account.

CompareFunc ( UIPanel, a, UIPanel, b ) : int

Function that can be used to depth-sort panels.

ConstrainTargetToBounds ( Transform target, Bounds &targetBounds, bool immediate ) : bool

Constrain the current target position to be within panel bounds.

ConstrainTargetToBounds ( Transform target, bool immediate ) : bool

Constrain the specified target to be within the panel's bounds.

Find ( Transform trans ) : UIPanel,

Find the UIPanel responsible for handling the specified transform.

Find ( Transform trans, bool createIfMissing ) : UIPanel,

Find the UIPanel responsible for handling the specified transform.

Find ( Transform trans, bool createIfMissing, int layer ) : UIPanel,

Find the UIPanel responsible for handling the specified transform.

FindDrawCall ( UIWidget, w ) : UIDrawCall,

Insert the specified widget into one of the existing draw calls if possible. If it's not possible, and a new draw call is required, 'null' is returned because draw call creation is a delayed operation.

GetSides ( Transform relativeTo ) : Vector3[]

Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.

GetViewSize ( ) : Vector2

Panel's size -- which is either the clipping rect, or the screen dimensions.

Invalidate ( bool includeChildren ) : void

Invalidating the panel should reset its alpha.

IsVisible ( UIWidget, w ) : bool

Returns whether the specified widget is visible by the panel.

IsVisible ( Vector3 worldPos ) : bool

Returns whether the specified world position is within the panel's bounds determined by the clipping rect.

IsVisible ( Vector3 a, Vector3 b, Vector3 c, Vector3 d ) : bool

Returns whether the specified rectangle is visible by the panel. The coordinates must be in world space.

ParentHasChanged ( ) : void

Find the parent panel, if we have one.

Refresh ( ) : void

Immediately refresh the panel.

RemoveWidget ( UIWidget w ) : void

Remove the widget from its current draw call, invalidating everything as needed.

SetDirty ( ) : void

Invalidate the panel's draw calls, forcing them to be rebuilt on the next update. This call also affects all children.

SetRect ( float x, float y, float width, float height ) : void

Set the panel's rectangle.

SortWidgets ( ) : void

Immediately sort all child widgets.

보호된 메소드들

메소드 설명
OnAnchor ( ) : void

Update the edges after the anchors have been updated.

OnDisable ( ) : void

Destroy all draw calls we've created when this script gets disabled.

OnEnable ( ) : void

Reset the frame IDs.

OnInit ( ) : void

Mark all widgets as having been changed so the draw calls get re-created.

OnStart ( ) : void

Layer is used to ensure that if it changes, widgets get moved as well.

비공개 메소드들

메소드 설명
Awake ( ) : void

Cache components.

FillAllDrawCalls ( ) : void

Fill the geometry fully, processing all widgets and re-creating all draw calls.

FillDrawCall ( UIDrawCall, dc ) : bool

Fill the geometry for the specified draw call.

FindParent ( ) : void

Find the parent panel, if we have one.

GetWindowSize ( ) : Vector2

Get the size of the game window in pixels.

InvalidateClipping ( ) : void

Invalidate the panel's clipping, calling child panels in turn.

LateUpdate ( ) : void

Update all panels and draw calls.

OnDrawGizmos ( ) : void

Draw a visible pink outline for the clipped area.

RebuildAllDrawCalls ( ) : void
UpdateDrawCalls ( ) : void

Update all draw calls associated with the panel.

UpdateLayers ( ) : void

Update the widget layers if the panel's layer has changed.

UpdateSelf ( ) : void

Update the panel, all of its widgets and draw calls.

UpdateTransformMatrix ( ) : void

Update the world-to-local transform matrix as well as clipping bounds.

UpdateWidgets ( ) : void

Update all of the widgets belonging to this panel.

메소드 상세

AddWidget() 공개 메소드

Make the following widget be managed by the panel.
public AddWidget ( UIWidget, w ) : void
w UIWidget,
리턴 void

Affects() 공개 메소드

Whether the specified widget is going to be affected by this panel in any way.
public Affects ( UIWidget, w ) : bool
w UIWidget,
리턴 bool

CalculateConstrainOffset() 공개 메소드

Calculate the offset needed to be constrained within the panel's bounds.
public CalculateConstrainOffset ( Vector2 min, Vector2 max ) : Vector3
min Vector2
max Vector2
리턴 Vector3

CalculateFinalAlpha() 공개 메소드

Widget's final alpha, after taking the panel's alpha into account.
public CalculateFinalAlpha ( int frameID ) : float
frameID int
리턴 float

CompareFunc() 정적인 공개 메소드

Function that can be used to depth-sort panels.
static public CompareFunc ( UIPanel, a, UIPanel, b ) : int
a UIPanel,
b UIPanel,
리턴 int

ConstrainTargetToBounds() 공개 메소드

Constrain the current target position to be within panel bounds.
public ConstrainTargetToBounds ( Transform target, Bounds &targetBounds, bool immediate ) : bool
target Transform
targetBounds Bounds
immediate bool
리턴 bool

ConstrainTargetToBounds() 공개 메소드

Constrain the specified target to be within the panel's bounds.
public ConstrainTargetToBounds ( Transform target, bool immediate ) : bool
target Transform
immediate bool
리턴 bool

Find() 정적인 공개 메소드

Find the UIPanel responsible for handling the specified transform.
static public Find ( Transform trans ) : UIPanel,
trans Transform
리턴 UIPanel,

Find() 정적인 공개 메소드

Find the UIPanel responsible for handling the specified transform.
static public Find ( Transform trans, bool createIfMissing ) : UIPanel,
trans Transform
createIfMissing bool
리턴 UIPanel,

Find() 정적인 공개 메소드

Find the UIPanel responsible for handling the specified transform.
static public Find ( Transform trans, bool createIfMissing, int layer ) : UIPanel,
trans Transform
createIfMissing bool
layer int
리턴 UIPanel,

FindDrawCall() 공개 메소드

Insert the specified widget into one of the existing draw calls if possible. If it's not possible, and a new draw call is required, 'null' is returned because draw call creation is a delayed operation.
public FindDrawCall ( UIWidget, w ) : UIDrawCall,
w UIWidget,
리턴 UIDrawCall,

GetSides() 공개 메소드

Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.
public GetSides ( Transform relativeTo ) : Vector3[]
relativeTo Transform
리턴 Vector3[]

GetViewSize() 공개 메소드

Panel's size -- which is either the clipping rect, or the screen dimensions.
public GetViewSize ( ) : Vector2
리턴 Vector2

Invalidate() 공개 메소드

Invalidating the panel should reset its alpha.
public Invalidate ( bool includeChildren ) : void
includeChildren bool
리턴 void

IsVisible() 공개 메소드

Returns whether the specified widget is visible by the panel.
public IsVisible ( UIWidget, w ) : bool
w UIWidget,
리턴 bool

IsVisible() 공개 메소드

Returns whether the specified world position is within the panel's bounds determined by the clipping rect.
public IsVisible ( Vector3 worldPos ) : bool
worldPos Vector3
리턴 bool

IsVisible() 공개 메소드

Returns whether the specified rectangle is visible by the panel. The coordinates must be in world space.
public IsVisible ( Vector3 a, Vector3 b, Vector3 c, Vector3 d ) : bool
a Vector3
b Vector3
c Vector3
d Vector3
리턴 bool

OnAnchor() 보호된 메소드

Update the edges after the anchors have been updated.
protected OnAnchor ( ) : void
리턴 void

OnDisable() 보호된 메소드

Destroy all draw calls we've created when this script gets disabled.
protected OnDisable ( ) : void
리턴 void

OnEnable() 보호된 메소드

Reset the frame IDs.
protected OnEnable ( ) : void
리턴 void

OnInit() 보호된 메소드

Mark all widgets as having been changed so the draw calls get re-created.
protected OnInit ( ) : void
리턴 void

OnStart() 보호된 메소드

Layer is used to ensure that if it changes, widgets get moved as well.
protected OnStart ( ) : void
리턴 void

ParentHasChanged() 공개 메소드

Find the parent panel, if we have one.
public ParentHasChanged ( ) : void
리턴 void

Refresh() 공개 메소드

Immediately refresh the panel.
public Refresh ( ) : void
리턴 void

RemoveWidget() 공개 메소드

Remove the widget from its current draw call, invalidating everything as needed.
public RemoveWidget ( UIWidget w ) : void
w UIWidget
리턴 void

SetDirty() 공개 메소드

Invalidate the panel's draw calls, forcing them to be rebuilt on the next update. This call also affects all children.
public SetDirty ( ) : void
리턴 void

SetRect() 공개 메소드

Set the panel's rectangle.
public SetRect ( float x, float y, float width, float height ) : void
x float
y float
width float
height float
리턴 void

SortWidgets() 공개 메소드

Immediately sort all child widgets.
public SortWidgets ( ) : void
리턴 void

프로퍼티 상세

alwaysOnScreen 공개적으로 프로퍼티

Optimization flag. Makes the assumption that the panel's geometry will always be on screen and the bounds don't need to be re-calculated.
public bool alwaysOnScreen
리턴 bool

anchorOffset 공개적으로 프로퍼티

By default, non-clipped panels use the camera's bounds, and the panel's position has no effect. If you want the panel's position to actually be used with anchors, set this field to 'true'.
public bool anchorOffset
리턴 bool

cullWhileDragging 공개적으로 프로퍼티

Whether widgets will be culled while the panel is being dragged. Having this on improves performance, but turning it off will reduce garbage collection.
public bool cullWhileDragging
리턴 bool

generateNormals 공개적으로 프로퍼티

Whether normals and tangents will be generated for all meshes
public bool generateNormals
리턴 bool

list 정적으로 공개적으로 프로퍼티

List of active panels.
static public BetterList list
리턴 BetterList

onClipMove 공개적으로 프로퍼티

Event callback that's triggered when the panel's clip region gets moved.
public OnClippingMoved onClipMove
리턴 OnClippingMoved

onGeometryUpdated 공개적으로 프로퍼티

Notification triggered when the panel's geometry get rebuilt. It's mainly here for debugging purposes.
public OnGeometryUpdated onGeometryUpdated
리턴 OnGeometryUpdated

renderQueue 공개적으로 프로퍼티

By default all panels manage render queues of their draw calls themselves by incrementing them so that the geometry is drawn in the proper order. You can alter this behaviour.
public RenderQueue renderQueue
리턴 RenderQueue

showInPanelTool 공개적으로 프로퍼티

Whether this panel will show up in the panel tool (set this to 'false' for dynamically created temporary panels)
public bool showInPanelTool
리턴 bool

startingRenderQueue 공개적으로 프로퍼티

Render queue used by the panel. The default value of '3000' is the equivalent of "Transparent". This property is only used if 'renderQueue' is set to something other than "Automatic".
public int startingRenderQueue
리턴 int

widgetsAreStatic 공개적으로 프로퍼티

Whether widgets drawn by this panel are static (won't move). This will improve performance.
public bool widgetsAreStatic
리턴 bool