The master branch was reverted to 1.7 because it was very unstable (bugs and stuff that wasn't mentioned on the documentation page yet) - features will come back with 2.0 - fixed debug window - fixed flexbox not sending drag events to it's children - small docs updates for 1.7 - removed the examples because the are outdated
648 B
648 B
getOffset
Description
Retrieves the current offset within a Textfield object, providing information about the current viewable portion of the text.
Returns
numberThe current horizontal offset within the Textfield.numberThe current vertical offset within the Textfield.
Usage
local basalt = require("basalt")
local mainFrame = basalt.createFrame()
local aTextfield = mainFrame:addTextfield()
-- Assume the Textfield has been scrolled previously
local xOffset, yOffset = aTextfield:getOffset()
basalt.debug("Horizontal Offset: "..xOffset)
basalt.debug("Vertical Offset: "..yOffset)
basalt.autoUpdate()