GUIContainer

From Virtual World Web Wiki
Revision as of 17:38, 17 February 2017 by Spark5 (Talk | contribs) (Documentation for the GUIContainer class)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • This is a JavaScript visible object

Remarks [edit]

Properties

Single Alpha {get; set;}
Sets the Alpha on the CanvasGroup of this object (which applies to children)
int AnimateDueTime {get; set;}
Number of milliseconds to wait after StartAnimate() before the first OnAnimate callback fires
int AnimateInterval {get; set;}
Minimum number of milliseconds between Animate calls
int AnimateTime {get;}
How many milliseconds since StartAnimate() was called
bool BlocksRaycasts {get; set;}
Sets "BlocksRaycast" value on this object's CanvasGroup - without BlocksRaycast, this object will allow objects underneath it to receive clicks and hovers instead of itself
bool ClickThrough {get; set;}
Ignore this container for determining if the user can click and rotate their camera.
int Height {get; set;}
The Y sizeDelta of this container
bool IgnoreParentGroups {get; set;}
Allows this object's CanvasGroup to override parent CanvasGroup properties (like BlocksRaycasts or Alpha)
bool Interactable {get; set;}
Enables/disables interactivity of this object's CanvasGroup (which applies to children)
string Name {get; set;}
Single Opacity {get; set;}
Sets the opacity (alpha) on the CanvasRenderer of this object (which does not apply to children), allowing for variable transparency effects
bool Outline {get; set;}
Apply an Outline component to this container
Color32 OutlineColor {get; set;}
Sets a color for the Outline component
JSVector2 OutlineOffset {get; set;}
Sets an offset for the Outline component
GUIRectTransform RectTransform {get; set;}
Reference to the container's RectTransform
bool Shadow {get; set;}
Apply a Shadow component to this container
Color32 ShadowColor {get; set;}
Sets a color for the Shadow component
JSVector2 ShadowOffset {get; set;}
Sets an offset for the Shadow component
int SubComponents {get;}
Number of child components
bool Visible {get; set;}
Whether or not to display this object and its children
int Width {get; set;}
The X sizeDelta of this container
Rectangle WorldRect {get;}
Gets the screen-space coordinates of this container and returns them as a rectangle {x, y, width, height}
int X {get; set;}
The anchored X position of this container
int Y {get; set;}
The anchored Y position of this container

Events

OnAnimate(EventHandler<FlexibleEventArgs>)
Fires every AnimateInterval milliseconds after StartAnimate() is called. Never called more often than once per render frame
OnDisappeared(EventHandler<FlexibleEventArgs>)
Event fired when the Disappear() function completes

Methods

void Appear(string animationName)
Causes the container to appear using its animator
void BringToFront()
Move container to front of the parent's ordering - this will cause reordering if done inside LayoutGroups
void ClearChildren()
Remove all children from this container
GUIContainer CreateComponent(string type, string componentName, string templateName)
GUIContainer CreateComponentFromTemplate(string templateName, string objectName)
Creates a new component under this container of the specified template
void Delay(Single duration, JSFlexibleFunction callback)
Call back a particular function after a given number of seconds
void Destroy()
Destroy this container and all children
void Disappear(string animationName)
Causes the container to disappear using its animator
GUIComponent FindChild(string byName, bool traverse)
GUIComponent GetComponent(int index)
Returns the indexed component from this container
GUIComponent GetComponentByName(string componentName)
Returns the first child component with a given name
GUIComponent[] GetComponents()
Gets an array of components from this container
void Hide(Single fadeDelay, JSFlexibleFunction callback)
Fade component out from visible and to 0 Alpha and not visible
bool MakeNumb()
Ends the sensitivity of a component (see: MakeSensitive)
void MakeSensitive(JSFlexibleFunction callback, bool singleClick)
Provides a function callback when the user clicks and whether the click occured on or off the object
GUIButton NewButton(string componentName)
GUIChatSurface NewChatSurface(string componentName)
GUICollapsiblePanel NewCollapsiblePanel(string componentName)
GUILargeColorPicker NewColorPicker(string componentName)
GUIComboBox NewComboBox(string componentName)
GUIDragItem NewDragItem(string componentName)
GUIFilePicker NewFilePicker(string componentName)
GUIGrid NewGrid(string componentName)
GUIImageBox NewImageBox(string componentName)
GUILabel NewLabel(string componentName)
GUIMenu NewMenu(string componentName)
GUIPanel NewPanel(string componentName)
GUIToggle NewRadioButton(string componentName)
GUIScrollBox NewScrollBox(string componentName)
GUISlider NewSlider(string componentName)
GUITabControl NewTabControl(string componentName)
GUITextArea NewTextArea(string componentName)
GUITextField NewTextField(string componentName)
GUITree NewTree(string componentName)
GUIWebView NewWebPage(string componentName)
Single PlayAnimation(string animationName)
Causes the container to play a particular animation
void SendToBack()
Move container to back of the parent's ordering - this will cause reordering if done inside LayoutGroups
void Show(Single fadeDelay, JSFlexibleFunction callback)
Fade component in from not visible and 0 Alpha to visible and full Alpha
void StartAnimate()
Start the animate timer callbacks
void StopAnimate()
Stop the animate timer callbacks