Lua Class - guiScrollView

Extends guiFrame

guiScrollView is a class in the Teverse Lua API that contains 6 properties, 0 methods and 0 events. guiScrollView extends guiFrame.

CODE SAMPLE
--The values set in this constructor are random and may not work correctly.
local guiScrollView = teverse.construct("guiScrollView", {
    active = true,
    backgroundAlpha = 1.0,
    backgroundColour = colour.rgb(255, 255, 255),
    canvasOffset = vector2(10, 10),
    canvasSize = guiCoord(0.0, 10, 0.0, 10),
    clip = true,
    dropShadowAlpha = 1.0,
    dropShadowBlur = 1.0,
    dropShadowColour = colour.rgb(255, 255, 255),
    dropShadowOffset = vector2(10, 10),
    name = "",
    parent = guiBase,
    position = guiCoord(0.0, 10, 0.0, 10),
    rotation = 1.0,
    scrollbarAlpha = 1.0,
    scrollbarColour = colour.rgb(255, 255, 255),
    scrollbarRadius = 1.0,
    scrollbarWidth = 1.0,
    size = guiCoord(0.0, 10, 0.0, 10),
    strokeAlpha = 1.0,
    strokeColour = colour.rgb(255, 255, 255),
    strokeRadius = 1.0,
    strokeWidth = 1.0,
    visible = true,
    zIndex = 1.0
})
Properties
vector2 canvasOffset

CODE SAMPLE
guiScrollView.canvasOffset = vector2(10, 10)
print(guiScrollView.canvasOffset) --> vector2(10, 10)
guiCoord canvasSize

If bigger than 1,0,1,0, scrollvars will be visible

CODE SAMPLE
guiScrollView.canvasSize = guiCoord(0.0, 10, 0.0, 10)
print(guiScrollView.canvasSize) --> guiCoord(0.0, 10, 0.0, 10)
number scrollbarAlpha

CODE SAMPLE
guiScrollView.scrollbarAlpha = 1.0
print(guiScrollView.scrollbarAlpha) --> 1.0
colour scrollbarColour

CODE SAMPLE
guiScrollView.scrollbarColour = colour.rgb(255, 255, 255)
print(guiScrollView.scrollbarColour) --> colour.rgb(255, 255, 255)
number scrollbarRadius

CODE SAMPLE
guiScrollView.scrollbarRadius = 1.0
print(guiScrollView.scrollbarRadius) --> 1.0
number scrollbarWidth

CODE SAMPLE
guiScrollView.scrollbarWidth = 1.0
print(guiScrollView.scrollbarWidth) --> 1.0
INHERITED READONLY
vector2 absolutePosition

Absolute position in pixels from the top left of the screen

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

Absolute size in pixels

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

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

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

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

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

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

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

When true, children are cropped to fit

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

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

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

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

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

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

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

Parent of a guiBase must be another gui element

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

Position relative to the parent element

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

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

Size relative to the parent element

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

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

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

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

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

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

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

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

Returns nil if not found

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

Destroys this object, further accessing this instance will error

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

Destroys all children

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

Fired when a property is changed.

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

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

Triggered when a child is added

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

Triggered when the object is destroyed

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

finger down

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

finger up

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

Mouse is hovering over this element

guiScrollView:on("mouseEnter", function()

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

Mouse is no longer hovering

guiScrollView:on("mouseExit", function()

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

Left mouse button down

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

Left mouse button up

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

Middle mouse button down

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

Middle mouse button up

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

Right mouse button down

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

Right mouse button up

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

Mouse wheeled

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

Some sections of our docs are maintained on github.