Lua Class - guiLine

Extends guiBase

guiLine is a class that contains 6 properties, 0 methods and 0 events. This class extends guiBase.

CODE SAMPLE
--The values set in this constructor are random and may not work correctly.
local guiLine = teverse.construct("guiLine", {
    active = true,
    clip = true,
    lineAlpha = 1.0,
    lineCap = enums.lineCap,
    lineColour = colour.rgb(255, 255, 255),
    lineWidth = 1.0,
    name = "",
    parent = guiBase,
    pointA = guiCoord(0.0, 10, 0.0, 10),
    pointB = guiCoord(0.0, 10, 0.0, 10),
    rotation = 1.0,
    visible = true,
    zIndex = 1.0
})
Properties
number lineAlpha

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

CODE SAMPLE
guiLine.lineAlpha = 1.0
print(guiLine.lineAlpha) --> 1.0
enums.lineCap lineCap

Determines how lines are capped

CODE SAMPLE
guiLine.lineCap = enums.lineCap
print(guiLine.lineCap) --> enums.lineCap
colour lineColour

CODE SAMPLE
guiLine.lineColour = colour.rgb(255, 255, 255)
print(guiLine.lineColour) --> colour.rgb(255, 255, 255)
number lineWidth

CODE SAMPLE
guiLine.lineWidth = 1.0
print(guiLine.lineWidth) --> 1.0
guiCoord pointA

Position of where the line starts relative to the parent element.

CODE SAMPLE
guiLine.pointA = guiCoord(0.0, 10, 0.0, 10)
print(guiLine.pointA) --> guiCoord(0.0, 10, 0.0, 10)
guiCoord pointB

Position of where the line ends relative to the parent element.

CODE SAMPLE
guiLine.pointB = guiCoord(0.0, 10, 0.0, 10)
print(guiLine.pointB) --> guiCoord(0.0, 10, 0.0, 10)
INHERITED
boolean active

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

CODE SAMPLE
guiLine.active = true
print(guiLine.active) --> true
INHERITED READONLY
table children

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

When true, children are cropped to fit

CODE SAMPLE
guiLine.clip = true
print(guiLine.clip) --> true
INHERITED READONLY
number id

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

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

Parent of a guiBase must be another gui element

CODE SAMPLE
guiLine.parent = guiBase
print(guiLine.parent) --> guiBase
INHERITED
number rotation

CODE SAMPLE
guiLine.rotation = 1.0
print(guiLine.rotation) --> 1.0
INHERITED
boolean visible

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

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

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

Returns nil if not found

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

Destroys this object, further accessing this instance will error

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

Destroys all children

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

Fired when a property is changed.

guiLine: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

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

Triggered when a child is added

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

Triggered when the object is destroyed

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

finger down

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

finger up

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

Mouse is hovering over this element

guiLine:on("mouseEnter", function()

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

Mouse is no longer hovering

guiLine:on("mouseExit", function()

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

Left mouse button down

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

Left mouse button up

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

Middle mouse button down

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

Middle mouse button up

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

Right mouse button down

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

Right mouse button up

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

Mouse wheeled

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

Some sections of our docs are maintained on github.