Home › Page › UghControl


Revision for “UghControl” created on 17 April, 2013 @ 18:17

Inherits from <a title="UghSprite" href="http://ugh.graveck.com/?incsub_wiki=ughsprite">UghSprite</a> This is an abstract class. This means that it cannot be instantiated on its own, only subclassed. Examples of UghControl subclasses are <a title="UghButton" href="http://ugh.graveck.com/?incsub_wiki=ughbutton">UghButton</a>, <a title="UghToggle" href="http://ugh.graveck.com/?incsub_wiki=ughtoggle">UghToggle</a>, and <a title="UghScrollView" href="http://ugh.graveck.com/?incsub_wiki=ughscrollview">UghScrollView</a>. [table caption="Variables" colwidth=20%|20%] name, type, description HotFingerID, int, The ID of the finger interacting with this control isLegalControl, boolean, Is this a legal control? [/table] [table caption="Class Variables" colwidth=20%|20%] name, type, description theOnlyLegalControls, <a title="UghControl" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughcontrol">UghControl</a>[], Array of all currently legal controls [/table] [table caption="Inherited Variables" colwidth=20%|20%] name, type, description anchor,<a title="UghSprite.Anchor" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite/anchor">UghSprite</a>.Anchor, The corner or custom point that the UghControl is anchored to customAnchorOffset, Vector3, The offset values for a custom anchor flippedHorizontal, boolean, Is the UghSprite flipped horizonally? flippedVertical, boolean, Is the UghSprite flipped vertically? normal,<a title="UghSpriteDefinition" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughspritedefinition">UghSpriteDefinition</a>, The default UghSpriteDefinition for this button Prototype,<a title="UghSpritePrototype" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughspriteprototype-2">UghSpritePrototype</a>, The current UghSpritePrototype for this button Offset, Vector3, The offset of the UghSprite [/table] [table caption="Inherited Functions" colwidth=20%|20%] name, type, description GetLocalCenter, Vector3, Returns the local center of the UghControl GetLocalOrigin, Vector3, Returns the local origin of the UghControl GetParentPublisher, <a title="UghPublisher" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughpublisher">UghPublisher</a>, "Returns the UghPublisher which this UghControl belongs to, or null if none" UpdateMesh, void, Updates this control's mesh [/table] [table caption="Inherited Class Variables" colwidth=20%|20%] name, type, description Anchor, enum, Enum for different common anchor positions AnchorToTextAnchor, TextAnchor, Converts an Anchor enum into a TextAnchor enum TextAnchorToAnchor, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>.Anchor, Converts a TextAnchor enum into an Anchor enum [/table] [table caption="Inherited Class Functions" colwidth=20%|20%] name, type, description ForceUpdateAllUghSpriteMeshes, void, Forces every UghSprite's mesh to update GetOffsetForAnchor, Vector3, Returns the Vector3 offset for a given Anchor value [/table] _ <strong>Understanding the UghControl abstract class</strong> UghControl is the abstract class that all interactive Ugh type assets derive from. It in turn derives from UghSprite. The important things to note in UghControl, are the UghControl array: <code>theOnlyLegalControls</code>, which can be filled with UghControls so that they are the exclusive UghControls that will process input. <code>theOnlyLegalControls</code> can only be interacted with in script, since it is a member of this abstract class, and is typically set to <code>null</code> so that all UghControls will process input. The other thing to note is the <code>IsLegalControl</code> property, which returns true if the <code>theOnlyLegalControls</code> array is null or if the calling UghControl is in the legal controls array. This property is used by UghInput to determine if the calling UghControl is valid and can fire the Input events such as <code>OnUghInputDown</code> and <code> OnUghInputUpAsButton</code>.

OldNewDate CreatedAuthorActions
17 April, 2013 @ 18:17 admin
17 April, 2013 @ 18:16 [Autosave] admin
17 April, 2013 @ 18:13 admin
2 April, 2013 @ 16:52 admin
18 March, 2013 @ 17:48 admin
18 March, 2013 @ 15:14 admin
8 March, 2013 @ 20:27 admin
8 March, 2013 @ 20:25 admin
8 March, 2013 @ 16:23 admin
7 March, 2013 @ 18:01 admin
7 March, 2013 @ 17:43 admin
6 March, 2013 @ 21:51 admin
6 March, 2013 @ 21:51 admin