YaUIObject
YaUIObject is the base class for UI management.Properties
YaUIComponent asYaCom
YaObject to YaComponentYaUIGraph asYaGraph
YaObject to YaGraphYaUIButton asYaButton
YaObject to YaButtonYaUIImage asYaImage
YaObject to YaImageYaUIList asYaList
YaObject to YaListYaUILoader asYaLoader
YaObject to YaLoaderYaUIProgressBar asYaProgressBar
YaObject to YaprogressBarYaUISlider asYaSlider
YaObject to YaSliderYaUIText asYaText
YaObject to YaTextYaUITextInput asYaTextInput
YaObject to YaTextInputboolean Visible
string Name
number SortingOrder
boolean Touchable
float2 Position
float2 Size
number Width
number Height
float2 Scale
float2 Pivot
number Alpha
boolean Draggable
boolean Dragging
number Rotation
boolean Enabled
table Data
boolean Grayed
number SourceWidth
number SourceHeight
EventListener OnClick
EventListener OnRightClick
EventListener OnTouchBegin
EventListener OnTouchMove
EventListener OnTouchEnd
EventListener OnDragStart
EventListener OnDragMove
EventListener OnDragEnd
EventListener OnRollOut
EventListener OnRollOver
EventListener OnSizeChanged
Functions
GTweener TweenMove(float2 startValue, float2 endValue, number duration)
Moves the UI from the startValue point to the endValue point over the given duration.
startValueThe start point to moveendValueThe end point to movedurationThe duration of the movement
GTweener TweenMoveX(number startValue, number endValue, number duration)
Moves the UI from the startValue point to theendValue point along the X axis over the given duration.
startValueThe start point to moveendValueThe end point to movedurationThe duration of the movement
GTweener TweenMoveY(number startValue, number endValue, number duration)
Moves the UI from the startValue point to theendValue point along the Y axis over the given duration.
startValueThe start point to moveendValueThe end point to movedurationThe duration of the movement
GTweener TweenScale(float2 startValue, float2 endValue, number duration)
Changes the scale of the UI from startValue to endValue over the given duration.
startValueThe initial scaleendValueThe changed scaledurationThe duration of the scaling
GTweener TweenScaleX(number startValue, number endValue, number duration)
Changes the scale of the UI from startValue to endValue along the X axis over the given duration.
startValueThe initial scaleendValueThe changed scaledurationThe duration of the scaling
GTweener TweenScaleY(number startValue, number endValue, number duration)
Changes the scale of the UI from startValue to endValue along the Y axis over the given duration.
startValueThe initial scaleendValueThe changed scaledurationThe duration of the scaling
GTweener TweenResize(float2 startValue, float2 endValue, number duration)
Resizes the UI from startValue to endValue over the given duration. Use this function when you only want to change the size of the UI and leave the texts in the UI unchanged.
startValueThe size before the resizingendValueThe size after the resizingdurationThe duration of the resizing
GTweener TweenFade(number startValue, number endValue, number duration)
The UI fades in or out over the given duration.
startValueThe initial transparency, ranging from 0 to 1endValueThe end transparency, ranging from 0 to 1durationThe duration of the fading in/out
GTweener TweenRotate(number startValue, number endValue, number duration)
Rotates the UI from the startValue angle to the endValue angle around the pivot over the given duration.
startValueThe start angleendValueThe end angledurationThe duration of the rotation
GTweener TweenRotateX(number startValue, number endValue, number duration)
Rotates the UI from the startValue angle to the endValue angle around the x-axis over the given duration.
startValueThe start angleendValueThe end angledurationThe duration of the rotation
GTweener TweenRotateY(number startValue, number endValue, number duration)
Rotates the UI from the startValue angle to the endValue angle around the y-axis over the given duration.
startValueThe start angleendValueThe end angledurationThe duration of the rotation
void SetSize(float2 size)
set the ui size
void SetPosition(float2 pos)
set the ui position
void MakeFullScreen()
set the ui size is fullscreen
float2 UIPointToScreenPoint(float2 uiPoint)
Transforms a point from the GRoot coordinate to local coordinates system.
float2 ScreenPointToUIPoint(float2 screenPoint)
Transforms a point from the local coordinate system to GRoot coordinates.