758 B
758 B
setPosition
Changes the position relative to its parent frame
Parameters:
number|stringx coordinate as number or dynamicvalue as stringnumber|stringy coordinate as number or dynamicvalue as stringbooleanWhether it will add/remove to the current coordinates instead of setting them
Returns:
objectThe object in use
Usage:
- Sets the Buttons position to an x coordinate of 2 with a y coordinate of 3
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition(2,3)
<button x="2" y="3" />
if you prefer to use dynamic values:
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition("parent.w * 0.5", 23)
<button x="parent.w * 0.5" y="3" />