C# Class UIWidget, DsynBio

Base class for all UI components that should be derived from when creating new widget types.
Inheritance: MonoBehaviour
Afficher le fichier Open project: CyberCRI/DsynBio Class Usage Examples

Protected Properties

Свойство Type Description
mChanged bool
mPanel UIPanel
mPlayMode bool
mTrans Transform

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
CheckParent ( ) : void

Method Details

Awake() protected méthode

Remember whether we're in play mode.
protected Awake ( ) : void
Résultat void

CheckLayer() public méthode

Check to ensure that the widget resides on the same layer as its panel.
public CheckLayer ( ) : void
Résultat void

CompareFunc() public static méthode

Static widget comparison function used for Z-sorting.
public static CompareFunc ( UIWidget, left, UIWidget, right ) : int
left UIWidget,
right UIWidget,
Résultat int

CreatePanel() public méthode

Ensure we have a panel referencing this widget.
public CreatePanel ( ) : void
Résultat void

MakePixelPerfect() public méthode

Make the widget pixel-perfect.
public MakePixelPerfect ( ) : void
Résultat void

MarkAsChanged() public méthode

Tell the panel responsible for the widget that something has changed and the buffers need to be rebuilt.
public MarkAsChanged ( ) : void
Résultat void

MarkAsChangedLite() public méthode

Only sets the local flag, does not notify the panel. In most cases you will want to use MarkAsChanged() instead.
public MarkAsChangedLite ( ) : void
Résultat void

OnDestroy() protected méthode

Unregister this widget.
protected OnDestroy ( ) : void
Résultat void

OnDisable() protected méthode

Clear references.
protected OnDisable ( ) : void
Résultat void

OnDrawGizmos() protected méthode

Draw some selectable gizmos.
protected OnDrawGizmos ( ) : void
Résultat void

OnEnable() protected méthode

Mark the widget and the panel as having been changed.
protected OnEnable ( ) : void
Résultat void

OnFill() public méthode

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
Résultat void

OnStart() protected méthode

Virtual Start() functionality for widgets.
protected OnStart ( ) : void
Résultat void

OnUpdate() public méthode

Virtual version of the Update function. Should return 'true' if the widget has changed visually.
public OnUpdate ( ) : bool
Résultat bool

ParentHasChanged() public méthode

Checks to ensure that the widget is still parented to the right panel.
public ParentHasChanged ( ) : void
Résultat void

Start() protected méthode

Set the depth, call the virtual start function, and sure we have a panel to work with.
protected Start ( ) : void
Résultat void

Update() public méthode

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
Résultat void

UpdateGeometry() public méthode

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
Résultat bool

WriteToBuffers() public méthode

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
Résultat void

Property Details

mChanged protected_oe property

protected bool mChanged
Résultat bool

mPanel protected_oe property

protected UIPanel mPanel
Résultat UIPanel

mPlayMode protected_oe property

protected bool mPlayMode
Résultat bool

mTrans protected_oe property

protected Transform mTrans
Résultat Transform