Lua Class - guiGradientFrame

Extends guiFrame

guiGradientFrame is a class that contains 6 properties, 0 methods and 0 events. This class extends guiFrame.

CODE SAMPLE
--The values set in this constructor are random and may not work correctly.
local guiGradientFrame = teverse.construct("guiGradientFrame", {
    active = true,
    backgroundAlpha = 1.0,
    backgroundAlphaB = 1.0,
    backgroundColour = colour.rgb(255, 255, 255),
    backgroundColourB = colour.rgb(255, 255, 255),
    clip = true,
    dropShadowAlpha = 1.0,
    dropShadowBlur = 1.0,
    dropShadowColour = colour.rgb(255, 255, 255),
    dropShadowOffset = vector2(10, 10),
    finish = guiCoord(0.0, 10, 0.0, 10),
    name = "",
    parent = guiBase,
    position = guiCoord(0.0, 10, 0.0, 10),
    rotation = 1.0,
    size = guiCoord(0.0, 10, 0.0, 10),
    start = guiCoord(0.0, 10, 0.0, 10),
    strokeAlpha = 1.0,
    strokeAlphaB = colour.rgb(255, 255, 255),
    strokeColour = colour.rgb(255, 255, 255),
    strokeColourB = colour.rgb(255, 255, 255),
    strokeRadius = 1.0,
    strokeWidth = 1.0,
    visible = true,
    zIndex = 1.0
})
Properties
number backgroundAlphaB

An alpha value of 1.0 is completely visible, 0.0 is invisible.

CODE SAMPLE
guiGradientFrame.backgroundAlphaB = 1.0
print(guiGradientFrame.backgroundAlphaB) --> 1.0
colour backgroundColourB

CODE SAMPLE
guiGradientFrame.backgroundColourB = colour.rgb(255, 255, 255)
print(guiGradientFrame.backgroundColourB) --> colour.rgb(255, 255, 255)
guiCoord finish

Position where the gradient ends, relative to the top left corner of this element.

CODE SAMPLE
guiGradientFrame.finish = guiCoord(0.0, 10, 0.0, 10)
print(guiGradientFrame.finish) --> guiCoord(0.0, 10, 0.0, 10)
guiCoord start

Position where the gradient begins, relative to the top left corner of this element.

CODE SAMPLE
guiGradientFrame.start = guiCoord(0.0, 10, 0.0, 10)
print(guiGradientFrame.start) --> guiCoord(0.0, 10, 0.0, 10)
colour strokeAlphaB

An alpha value of 1.0 is completely visible, 0.0 is invisible.

CODE SAMPLE
guiGradientFrame.strokeAlphaB = colour.rgb(255, 255, 255)
print(guiGradientFrame.strokeAlphaB) --> colour.rgb(255, 255, 255)
colour strokeColourB

CODE SAMPLE
guiGradientFrame.strokeColourB = colour.rgb(255, 255, 255)
print(guiGradientFrame.strokeColourB) --> colour.rgb(255, 255, 255)
INHERITED READONLY
vector2 absolutePosition

Absolute position in pixels from the top left of the screen

CODE SAMPLE
print(guiGradientFrame.absolutePosition) --> vector2(10, 10)
INHERITED READONLY
vector2 absoluteSize

Absolute size in pixels

CODE SAMPLE
print(guiGradientFrame.absoluteSize) --> vector2(10, 10)
INHERITED
boolean active

When true, this element can capture the mouse's hover

CODE SAMPLE
guiGradientFrame.active = true
print(guiGradientFrame.active) --> true
INHERITED
number backgroundAlpha

An alpha value of 1.0 is completely visible, 0.0 is invisible.

CODE SAMPLE
guiGradientFrame.backgroundAlpha = 1.0
print(guiGradientFrame.backgroundAlpha) --> 1.0
INHERITED
colour backgroundColour

CODE SAMPLE
guiGradientFrame.backgroundColour = colour.rgb(255, 255, 255)
print(guiGradientFrame.backgroundColour) --> colour.rgb(255, 255, 255)
INHERITED READONLY
table children

CODE SAMPLE
print(guiGradientFrame.children) --> {}
INHERITED
boolean clip

When true, children are cropped to fit

CODE SAMPLE
guiGradientFrame.clip = true
print(guiGradientFrame.clip) --> true
INHERITED
number dropShadowAlpha

CODE SAMPLE
guiGradientFrame.dropShadowAlpha = 1.0
print(guiGradientFrame.dropShadowAlpha) --> 1.0
INHERITED
number dropShadowBlur

CODE SAMPLE
guiGradientFrame.dropShadowBlur = 1.0
print(guiGradientFrame.dropShadowBlur) --> 1.0
INHERITED
colour dropShadowColour

CODE SAMPLE
guiGradientFrame.dropShadowColour = colour.rgb(255, 255, 255)
print(guiGradientFrame.dropShadowColour) --> colour.rgb(255, 255, 255)
INHERITED
vector2 dropShadowOffset

CODE SAMPLE
guiGradientFrame.dropShadowOffset = vector2(10, 10)
print(guiGradientFrame.dropShadowOffset) --> vector2(10, 10)
INHERITED READONLY
number id

CODE SAMPLE
print(guiGradientFrame.id) --> 1.0
INHERITED
string name

CODE SAMPLE
guiGradientFrame.name = ""
print(guiGradientFrame.name) --> ""
INHERITED
guiBase parent

Parent of a guiBase must be another gui element

CODE SAMPLE
guiGradientFrame.parent = guiBase
print(guiGradientFrame.parent) --> guiBase
INHERITED
guiCoord position

Position relative to the parent element

CODE SAMPLE
guiGradientFrame.position = guiCoord(0.0, 10, 0.0, 10)
print(guiGradientFrame.position) --> guiCoord(0.0, 10, 0.0, 10)
INHERITED
number rotation

CODE SAMPLE
guiGradientFrame.rotation = 1.0
print(guiGradientFrame.rotation) --> 1.0
INHERITED
guiCoord size

Size relative to the parent element

CODE SAMPLE
guiGradientFrame.size = guiCoord(0.0, 10, 0.0, 10)
print(guiGradientFrame.size) --> guiCoord(0.0, 10, 0.0, 10)
INHERITED
number strokeAlpha

CODE SAMPLE
guiGradientFrame.strokeAlpha = 1.0
print(guiGradientFrame.strokeAlpha) --> 1.0
INHERITED
colour strokeColour

CODE SAMPLE
guiGradientFrame.strokeColour = colour.rgb(255, 255, 255)
print(guiGradientFrame.strokeColour) --> colour.rgb(255, 255, 255)
INHERITED
number strokeRadius

CODE SAMPLE
guiGradientFrame.strokeRadius = 1.0
print(guiGradientFrame.strokeRadius) --> 1.0
INHERITED
number strokeWidth

CODE SAMPLE
guiGradientFrame.strokeWidth = 1.0
print(guiGradientFrame.strokeWidth) --> 1.0
INHERITED
boolean visible

CODE SAMPLE
guiGradientFrame.visible = true
print(guiGradientFrame.visible) --> true
INHERITED
number zIndex

Increasing the zIndex will render this element above others. Currently a signed 16 bit integer.

CODE SAMPLE
guiGradientFrame.zIndex = 1.0
print(guiGradientFrame.zIndex) --> 1.0
Methods
INHERITED
guiBase child( string name )
CODE SAMPLE
guiGradientFrame:child("") --> guiBase

Returns nil if not found

INHERITED
destroy( )
CODE SAMPLE
guiGradientFrame:destroy() --> 

Destroys this object, further accessing this instance will error

INHERITED
destroyChildren( )
CODE SAMPLE
guiGradientFrame:destroyChildren() --> 

Destroys all children

Events
INHERITED
:on("changed", function( string property, variant oldValue, variant newValue ) end)

Fired when a property is changed.

guiGradientFrame:on("changed", function(property, oldValue, newValue)
  print(property) --> ""  print(oldValue) --> variant  print(newValue) --> variant
end)
INHERITED
:on("childAdded", function( guiBase newChild ) end)

Triggered when the viewport size is changed

guiGradientFrame:on("childAdded", function(newChild)
  print(newChild) --> guiBase
end)
INHERITED
:on("childRemoved", function( guiBase newChild ) end)

Triggered when a child is added

guiGradientFrame:on("childRemoved", function(newChild)
  print(newChild) --> guiBase
end)
INHERITED
:on("destroying", function( guiBase newChild ) end)

Triggered when the object is destroyed

guiGradientFrame:on("destroying", function(newChild)
  print(newChild) --> guiBase
end)
INHERITED
:on("fingerDown", function( vector2 fingerPosition ) end)

finger down

guiGradientFrame:on("fingerDown", function(fingerPosition)
  print(fingerPosition) --> vector2(10, 10)
end)
INHERITED
:on("fingerUp", function( vector2 fingerPosition ) end)

finger up

guiGradientFrame:on("fingerUp", function(fingerPosition)
  print(fingerPosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseEnter", function( ) end)

Mouse is hovering over this element

guiGradientFrame:on("mouseEnter", function()

end)
INHERITED
:on("mouseExit", function( ) end)

Mouse is no longer hovering

guiGradientFrame:on("mouseExit", function()

end)
INHERITED
:on("mouseLeftDown", function( vector2 mousePosition ) end)

Left mouse button down

guiGradientFrame:on("mouseLeftDown", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseLeftUp", function( vector2 mousePosition ) end)

Left mouse button up

guiGradientFrame:on("mouseLeftUp", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseMiddleDown", function( vector2 mousePosition ) end)

Middle mouse button down

guiGradientFrame:on("mouseMiddleDown", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseMiddleUp", function( vector2 mousePosition ) end)

Middle mouse button up

guiGradientFrame:on("mouseMiddleUp", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseRightDown", function( vector2 mousePosition ) end)

Right mouse button down

guiGradientFrame:on("mouseRightDown", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseRightUp", function( vector2 mousePosition ) end)

Right mouse button up

guiGradientFrame:on("mouseRightUp", function(mousePosition)
  print(mousePosition) --> vector2(10, 10)
end)
INHERITED
:on("mouseWheel", function( vector2 wheelMovement ) end)

Mouse wheeled

guiGradientFrame:on("mouseWheel", function(wheelMovement)
  print(wheelMovement) --> vector2(10, 10)
end)

Some sections of our docs are maintained on github.