C# Класс UIWidget, DsynBio

Base class for all UI components that should be derived from when creating new widget types.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
mChanged bool
mPanel UIPanel
mPlayMode bool
mTrans Transform

Открытые методы

Метод Описание
CheckLayer ( ) : void

Check to ensure that the widget resides on the same layer as its panel.

CompareFunc ( UIWidget, left, UIWidget, right ) : int

Static widget comparison function used for Z-sorting.

CreatePanel ( ) : void

Ensure we have a panel referencing this widget.

MakePixelPerfect ( ) : void

Make the widget pixel-perfect.

MarkAsChanged ( ) : void

Tell the panel responsible for the widget that something has changed and the buffers need to be rebuilt.

MarkAsChangedLite ( ) : void

Only sets the local flag, does not notify the panel. In most cases you will want to use MarkAsChanged() instead.

OnFill ( BetterList verts, BetterList uvs, BetterList cols ) : void

Virtual function called by the UIPanel that fills the buffers.

OnUpdate ( ) : bool

Virtual version of the Update function. Should return 'true' if the widget has changed visually.

ParentHasChanged ( ) : void

Checks to ensure that the widget is still parented to the right panel.

Update ( ) : void

Ensure that we have a panel to work with. The reason the panel isn't added in OnEnable() is because OnEnable() is called right after Awake(), which is a problem when the widget is brought in on a prefab object as it happens before it gets parented.

UpdateGeometry ( Matrix4x4 &worldToPanel, bool parentMoved, bool generateNormals ) : bool

Update the widget and fill its geometry if necessary. Returns whether something was changed.

WriteToBuffers ( BetterList v, BetterList u, BetterList c, BetterList n, BetterList t ) : void

Append the local geometry buffers to the specified ones.

Защищенные методы

Метод Описание
Awake ( ) : void

Remember whether we're in play mode.

OnDestroy ( ) : void

Unregister this widget.

OnDisable ( ) : void

Clear references.

OnDrawGizmos ( ) : void

Draw some selectable gizmos.

OnEnable ( ) : void

Mark the widget and the panel as having been changed.

OnStart ( ) : void

Virtual Start() functionality for widgets.

Start ( ) : void

Set the depth, call the virtual start function, and sure we have a panel to work with.

Приватные методы

Метод Описание
CheckParent ( ) : void

Описание методов

Awake() защищенный Метод

Remember whether we're in play mode.
protected Awake ( ) : void
Результат void

CheckLayer() публичный Метод

Check to ensure that the widget resides on the same layer as its panel.
public CheckLayer ( ) : void
Результат void

CompareFunc() публичный статический Метод

Static widget comparison function used for Z-sorting.
public static CompareFunc ( UIWidget, left, UIWidget, right ) : int
left UIWidget,
right UIWidget,
Результат int

CreatePanel() публичный Метод

Ensure we have a panel referencing this widget.
public CreatePanel ( ) : void
Результат void

MakePixelPerfect() публичный Метод

Make the widget pixel-perfect.
public MakePixelPerfect ( ) : void
Результат void

MarkAsChanged() публичный Метод

Tell the panel responsible for the widget that something has changed and the buffers need to be rebuilt.
public MarkAsChanged ( ) : void
Результат void

MarkAsChangedLite() публичный Метод

Only sets the local flag, does not notify the panel. In most cases you will want to use MarkAsChanged() instead.
public MarkAsChangedLite ( ) : void
Результат void

OnDestroy() защищенный Метод

Unregister this widget.
protected OnDestroy ( ) : void
Результат void

OnDisable() защищенный Метод

Clear references.
protected OnDisable ( ) : void
Результат void

OnDrawGizmos() защищенный Метод

Draw some selectable gizmos.
protected OnDrawGizmos ( ) : void
Результат void

OnEnable() защищенный Метод

Mark the widget and the panel as having been changed.
protected OnEnable ( ) : void
Результат void

OnFill() публичный Метод

Virtual function called by the UIPanel that fills the buffers.
public OnFill ( BetterList verts, BetterList uvs, BetterList cols ) : void
verts BetterList
uvs BetterList
cols BetterList
Результат void

OnStart() защищенный Метод

Virtual Start() functionality for widgets.
protected OnStart ( ) : void
Результат void

OnUpdate() публичный Метод

Virtual version of the Update function. Should return 'true' if the widget has changed visually.
public OnUpdate ( ) : bool
Результат bool

ParentHasChanged() публичный Метод

Checks to ensure that the widget is still parented to the right panel.
public ParentHasChanged ( ) : void
Результат void

Start() защищенный Метод

Set the depth, call the virtual start function, and sure we have a panel to work with.
protected Start ( ) : void
Результат void

Update() публичный Метод

Ensure that we have a panel to work with. The reason the panel isn't added in OnEnable() is because OnEnable() is called right after Awake(), which is a problem when the widget is brought in on a prefab object as it happens before it gets parented.
public Update ( ) : void
Результат void

UpdateGeometry() публичный Метод

Update the widget and fill its geometry if necessary. Returns whether something was changed.
public UpdateGeometry ( Matrix4x4 &worldToPanel, bool parentMoved, bool generateNormals ) : bool
worldToPanel Matrix4x4
parentMoved bool
generateNormals bool
Результат bool

WriteToBuffers() публичный Метод

Append the local geometry buffers to the specified ones.
public WriteToBuffers ( BetterList v, BetterList u, BetterList c, BetterList n, BetterList t ) : void
v BetterList
u BetterList
c BetterList
n BetterList
t BetterList
Результат void

Описание свойств

mChanged защищенное свойство

protected bool mChanged
Результат bool

mPanel защищенное свойство

protected UIPanel mPanel
Результат UIPanel

mPlayMode защищенное свойство

protected bool mPlayMode
Результат bool

mTrans защищенное свойство

protected Transform mTrans
Результат Transform