Home › Page › UghPublisher

UghPublisher

Revision for “UghPublisher” created on 17 April, 2013 @ 19:04

Title
UghPublisher
Content
Inherits from <a title="Script" href="http://ugh.graveck.com/?incsub_wiki=script">Script</a> UghPublisher is the workhorse of Ugh.  A typical usage will inherit from this class and provide various callback functions for events defined in the editor inspector. See the UghPublisher tutorial for more details on how to use this class. [table caption="Variables" colwidth="20%|20%"] name, type, description transformReferences, TransformReference[], Array of transform references transforms, TransformDictionary, Dictionary of transforms ughTextReferences, UghTextReference[], Array of UghText references ughTexts, UghTextsDictionary, Dictionary of UghTexts ughButtonReferences, UghButtonReference[], Array of UghButton references ughButtons, UghButtonsDictionary, Dictionary of UghButtons ughSlideToggleReferences, UghSlideToggleReference[], Array of UghSlideToggle references ughSlideToggles, UghSlideToggleDictionary, Dictionary of UghSlideToggles ughSliderReferences, UghSliderReference[], Array of UghSlider references ughSliders, UghSliderDictionary, Dictionary of UghSliders [/table] [table caption="Functions" colwidth="20%|20%"] name, type, description GetButton, <a title="UghButton" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughbutton">UghButton</a>, Returns the UghButton given a name. GetSprite, <a title="UghSprite" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughsprite">UghSprite</a>, Returns an UghSprite given a name. OnButtonPressed, void, Triggers the publisher callback for the given UghButton. [/table] <strong>Using UghPublisher in Script</strong> [sourcecode language="csharp"]public UghSprite GetSprite(string name)[/sourcecode] [sourcecode language="csharp"]public UghButton GetButton(string name)[/sourcecode] These two functions are used to find an UghButton or UghSprite.  They are largely superseded by the ughButtons and transforms dictionaries, and are provided for backwards compatibility. [sourcecode language="csharp"]public void OnButtonPressed(UghButton button)[/sourcecode] This function triggers the assigned callback function for a given UghButton.  This is used by the internal logic to trigger callback functions, but can also be useful to simulate button clicks for debug or automation purposes.
Excerpt


OldNewDate CreatedAuthorActions
17 April, 2013 @ 19:04 admin
17 April, 2013 @ 19:04 admin
29 March, 2013 @ 20:42 [Autosave] admin
29 March, 2013 @ 20:41 admin
18 March, 2013 @ 15:50 admin
18 March, 2013 @ 15:46 admin
18 March, 2013 @ 15:45 admin
8 March, 2013 @ 22:14 admin
8 March, 2013 @ 22:10 admin
8 March, 2013 @ 20:02 admin
8 March, 2013 @ 20:01 admin
8 March, 2013 @ 20:01 admin
8 March, 2013 @ 19:56 admin
8 March, 2013 @ 19:55 admin
7 March, 2013 @ 22:07 admin
7 March, 2013 @ 20:15 admin
7 March, 2013 @ 20:02 admin
6 March, 2013 @ 21:48 admin