UIField
Inherits from Instance
UIField is the base class of all UI classes.
Summary
Properties
PivotPoint:Vector2 = Vector2.NewPositionOffset:Vector2 = Vector2.NewPositionRelative:Vector2 = Vector2.NewRotation:floatSizeOffset:Vector2 = Vector2.NewSizeRelative:Vector2 = Vector2.NewVisible:boolClipDescendants:bool
Events
Properties
PivotPoint
UIField.PivotPoint: Vector2 = Vector2.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0.5 | any | - | |
0.5 | any | - |
The pivot point of the UI element.
PositionOffset
UIField.PositionOffset: Vector2 = Vector2.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
100 | any | - | |
100 | any | - |
The offset of the UI element in pixels.
PositionRelative
UIField.PositionRelative: Vector2 = Vector2.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0.5 | any | - | |
0.5 | any | - |
The position of the UI element relative to its parent.
Rotation
UIField.Rotation: float
The rotation of the UI element.
SizeOffset
UIField.SizeOffset: Vector2 = Vector2.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
100 | any | - | |
100 | any | - |
The size of the UI element in pixels.
SizeRelative
UIField.SizeRelative: Vector2 = Vector2.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
1 | any | - | |
1 | any | - |
The size of the UI element relative to its parent.
Visible
UIField.Visible: bool
Determines whether the UI element is visible or not.
ClipDescendants
UIField.ClipDescendants: bool
Determines whether the UI element clips its descendants.
Events
MouseDown
UIField.MouseDown()
Fires when the mouse is clicked
Example
label.MouseDown:Connect(function()
label.Text = "Mouse Down"
end)
MouseUp
UIField.MouseUp()
Fires when the mouse is released
Example
label.MouseUp:Connect(function()
label.Text = "Mouse Up"
end)